mancala/apps/frontend/src/components/board/StoneView.tsx

20 lines
559 B
TypeScript
Raw Normal View History

2022-07-14 08:53:26 +03:00
import * as React from "react";
import { FunctionComponent } from "react";
const StoneView: FunctionComponent<{ color: string }> = ({ color }) => {
2022-07-14 23:21:20 +03:00
return (
<div className="stone" style={{ background: color }}>
<style jsx>{`
.stone {
margin: 1px;
width: calc(1 * var(--board-unit));
height: calc(1 * var(--board-unit));
border-radius: calc(10 * var(--board-unit));
2022-07-14 23:21:20 +03:00
transition: background-color 0.5s;
}
`}</style>
</div>
);
};
2022-07-14 08:53:26 +03:00
2022-07-14 23:21:20 +03:00
export default StoneView;