use styled-jsx in StoneView

This commit is contained in:
Halit Aksoy 2022-07-14 23:21:20 +03:00
parent 07bf32568c
commit 5c01be8b2e

View File

@ -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;