This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module DJB2 | |
| export djb2 | |
| # 177573 = 5381 * 33 | |
| djb2(s::Char)::Int64 = 177573 + Int(s) | |
| function djb2(s::String)::Int64 | |
| # seed value for better performance | |
| hash = 5381 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { ChakraProps, ResponsiveValue } from "@chakra-ui/react"; | |
| import { Property } from "csstype"; | |
| export type ChakraGradientBorderProps = { | |
| borderGradient: ResponsiveValue<Property.Background>; | |
| } & ChakraProps; | |
| export const chakraGradientBorder = <P extends object>( | |
| Component: React.ComponentType<P> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const ChakraGradientBorder = Component => ({ borderGradient, borderWidth = '.1rem', borderRadius = 0, bg='#fff', ...props }) => { | |
| return( | |
| <Component | |
| pos='relative' | |
| bg={bg} | |
| borderWidth={borderWidth} | |
| bgClip='padding-box' | |
| borderColor='transparent' | |
| borderRadius={borderRadius} | |
| _before={{ |