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 }) => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
background: color,
|
||||
margin: "1px",
|
||||
width: "1vw",
|
||||
height: "1vw",
|
||||
borderRadius: "10vw",
|
||||
transition: "background-color 0.5s",
|
||||
}}
|
||||
/>
|
||||
<div className="stone" style={{ background: color }}>
|
||||
<style jsx>{`
|
||||
.stone {
|
||||
margin: 1px;
|
||||
width: 1vw;
|
||||
height: 1vw;
|
||||
border-radius: 10vw;
|
||||
transition: background-color 0.5s;
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
export default StoneView;
|
||||
export default StoneView;
|
||||
Loading…
Reference in New Issue
Block a user