2022-03-21 20:30:45 -07:00
|
|
|
import type { PostVisibility } from "@lib/types"
|
2022-11-13 23:02:31 -08:00
|
|
|
import Badge from "../badge"
|
2022-03-06 16:46:59 -08:00
|
|
|
|
2022-11-12 01:28:06 -08:00
|
|
|
type CastPostVisibility = PostVisibility | string
|
|
|
|
|
2022-03-06 16:46:59 -08:00
|
|
|
type Props = {
|
2022-11-12 01:28:06 -08:00
|
|
|
visibility: CastPostVisibility
|
2022-03-06 16:46:59 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
const VisibilityBadge = ({ visibility }: Props) => {
|
2022-11-13 23:02:31 -08:00
|
|
|
return <Badge type={"primary"}>{visibility}</Badge>
|
2022-03-06 16:46:59 -08:00
|
|
|
}
|
|
|
|
|
2022-03-10 19:51:10 -08:00
|
|
|
export default VisibilityBadge
|