Skip to content

Instantly share code, notes, and snippets.

@d-ivashchuk
Created November 19, 2018 10:26
Show Gist options
  • Save d-ivashchuk/877051caa5246370d5cb355f9e2756e1 to your computer and use it in GitHub Desktop.
Save d-ivashchuk/877051caa5246370d5cb355f9e2756e1 to your computer and use it in GitHub Desktop.
import styled, { keyframes } from "styled-components";
const pulse = keyframes`
0% {
fill:#10aded;
stroke-width:10px
}
50% {
fill:#bada55;
stroke-width:2px
}
100%{
fill:#10aded;
stroke-width:10px
}
`;
const StyledCircle = styled.svg`
height: 25rem;
width: 25rem;
display: block;
margin: auto;
`;
const StyledInnerCircle = styled.circle`
animation: ${pulse} infinite 4s linear;
fill: blue;
`;
const circle = (
<StyledCircle height="100" width="100">
<StyledInnerCircle cx="50" cy="50" r="40" stroke="black" stroke-width="3" />
</StyledCircle>
);
class App extends React.Component {
render() {
return <div>{circle}</div>;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment