use styled-jsx in StoreView
This commit is contained in:
parent
5c01be8b2e
commit
3651936497
@ -22,33 +22,35 @@ const StoreView: FunctionComponent<{
|
|||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
className="store"
|
||||||
style={{
|
style={{
|
||||||
gridColumn: gridColumn,
|
|
||||||
gridRow: gridRow,
|
|
||||||
background: pitViewModel.pitColor,
|
background: pitViewModel.pitColor,
|
||||||
margin: "5px",
|
gridColumn: gridColumn,
|
||||||
borderRadius: "10vw",
|
gridRow: gridRow
|
||||||
display: "flex",
|
}}>
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignContent: "center",
|
|
||||||
flexWrap: "wrap",
|
|
||||||
position: "relative",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{stones}
|
{stones}
|
||||||
<span
|
<span className="store-stone-count-text" style={{ color: textColor }}>
|
||||||
style={{
|
|
||||||
position: "absolute",
|
|
||||||
bottom: "2vw",
|
|
||||||
fontFamily: "monospace",
|
|
||||||
fontWeight: "bold",
|
|
||||||
fontSize: "2vw",
|
|
||||||
color: textColor,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{stones.length}
|
{stones.length}
|
||||||
</span>
|
</span>
|
||||||
|
<style jsx>{`
|
||||||
|
.store {
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 10vw;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.store-stone-count-text {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 2vw;
|
||||||
|
font-family: monospace;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 2vw;
|
||||||
|
}
|
||||||
|
`}</style>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user