feat: select bed type

This commit is contained in:
Simon Emanuelsson
2024-10-03 11:12:36 +02:00
parent 150f0f0e4e
commit e6b22b81f4
26 changed files with 433 additions and 169 deletions

View File

@@ -0,0 +1,35 @@
import type { IconProps } from "@/types/components/icon"
interface BaseCardProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
Icon?: (props: IconProps) => JSX.Element
declined?: boolean
iconHeight?: number
iconWidth?: number
name?: string
saving?: boolean
subtitle?: string
title: string
type: "checkbox" | "radio"
value?: string
}
interface ListCardProps extends BaseCardProps {
list: {
title: string
}[]
text?: never
}
interface TextCardProps extends BaseCardProps {
list?: never
text: string
}
export type CardProps = ListCardProps | TextCardProps
export type CheckboxProps =
| Omit<ListCardProps, "type">
| Omit<TextCardProps, "type">
export type RadioProps =
| Omit<ListCardProps, "type">
| Omit<TextCardProps, "type">