This commit is contained in:
Ansh Nanda
2023-12-14 23:23:00 +05:30
parent 224c2fdf9d
commit b4aab3e74b
2 changed files with 26 additions and 7 deletions
+10 -4
View File
@@ -12,7 +12,12 @@ import {colors} from '#/lib/styles'
const ratio = 106 / 120
export function Logo({fill, ...rest}: {fill?: PathProps['fill']} & SvgProps) {
type Props = {
fill?: PathProps['fill']
} & SvgProps
export const Logo = React.forwardRef(function LogoImpl(props: Props, ref) {
const {fill, ...rest} = props
const gradient = fill === 'sky'
const _fill = gradient ? 'url(#sky)' : fill || colors.blue3
// @ts-ignore it's fiiiiine
@@ -20,10 +25,11 @@ export function Logo({fill, ...rest}: {fill?: PathProps['fill']} & SvgProps) {
return (
<Svg
fill="none"
// @ts-ignore it's fiiiiine
ref={ref}
viewBox="0 0 64 64"
{...rest}
width={size}
height={size * ratio}>
style={{width: size, height: size * ratio}}>
{gradient && (
<Defs>
<LinearGradient id="sky" x1="0" y1="0" x2="0" y2="1">
@@ -39,4 +45,4 @@ export function Logo({fill, ...rest}: {fill?: PathProps['fill']} & SvgProps) {
/>
</Svg>
)
}
})