use styled-jsx in StoneView
This commit is contained in:
parent
07bf32568c
commit
5c01be8b2e
@ -3,17 +3,18 @@ import { FunctionComponent } from "react";
|
|||||||
|
|
||||||
const StoneView: FunctionComponent<{ color: string }> = ({ color }) => {
|
const StoneView: FunctionComponent<{ color: string }> = ({ color }) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div className="stone" style={{ background: color }}>
|
||||||
style={{
|
<style jsx>{`
|
||||||
background: color,
|
.stone {
|
||||||
margin: "1px",
|
margin: 1px;
|
||||||
width: "1vw",
|
width: 1vw;
|
||||||
height: "1vw",
|
height: 1vw;
|
||||||
borderRadius: "10vw",
|
border-radius: 10vw;
|
||||||
transition: "background-color 0.5s",
|
transition: background-color 0.5s;
|
||||||
}}
|
}
|
||||||
/>
|
`}</style>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default StoneView;
|
export default StoneView;
|
||||||
Loading…
Reference in New Issue
Block a user