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