File size: 537 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import { Box, type BoxProps } from "@chakra-ui/react"
interface TokenDocProps extends BoxProps {
action?: React.ReactNode
}
export const TokenDoc = (props: TokenDocProps) => {
const { title, children, action, ...rest } = props
return (
<Box bg="bg" rounded="lg" borderWidth="0.5px" {...rest}>
<Box p="6" pb="0">
{title && (
<Box fontWeight="medium" fontSize="sm" as="h2">
{title}
</Box>
)}
{action}
</Box>
<Box p="6">{children}</Box>
</Box>
)
}
|