-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blog ideas #13
Comments
|
|
|
|
/** @jsx jsx */ vs Om develop it complains about React, and builds without it. But on build it does not build without it. |
you might find this helpful https://paulie.dev/posts/2020/07/everythings-a-box/ |
Is it possible to animate a path around its own center? Not the svg center? |
Hmmm, tricky one. I think what i'd do is...
Having it all as one Svg makes it more difficult to target and or control the individual elements. /** @jsx jsx */
import { Box, Grid, jsx } from 'theme-ui'
const fade = ...
export const Svg = ({ viewBox, path, sx }) => {
return (
<Box
sx={{
position: 'relative'
svg :{
// do all the animation stuff here
animationName: fade.toString()
}
}}
>
<svg
version="1.0"
fill="currentcolor"
viewBox={viewBox}
preserveAspectRatio="xMidYMid meet"
x="0"
y="0"
width: "100%",
height: "100%",
sx={{
...sx,
}}
>
<path d={path} fill="currentcolor" />
</svg>
</Box>
)
}
// Usage
<Grid
sx={{
gridTemplateColumns: ['auto auto', 'auto auto auto auto'],
}}
>
<Svg path="" viewBox="" sx={{ color: '#xxxxx' }} />
<Svg path="" viewBox="" sx={{ color: '#xxxxx' }} />
<Svg path="" viewBox="" sx={{ color: '#xxxxx' }} />
<Svg path="" viewBox="" sx={{ color: '#xxxxx' }} />
</Grid> |
How to make a favicon with an emoji |
The text was updated successfully, but these errors were encountered: