mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-13 06:21:21 -05:00
22 lines
375 B
TypeScript
22 lines
375 B
TypeScript
import React from "react"
|
|
import { Box } from "@chakra-ui/core"
|
|
|
|
interface LabelProps {
|
|
required?: boolean
|
|
}
|
|
|
|
const Label: React.FC<LabelProps> = ({ children, required }) => {
|
|
return (
|
|
<Box mb="0.2em">
|
|
<b>{children}</b>{" "}
|
|
{required && (
|
|
<Box as="span" color="red.500">
|
|
*
|
|
</Box>
|
|
)}
|
|
</Box>
|
|
)
|
|
}
|
|
|
|
export default Label
|