Yutaro Hayashi
Yutaro Hayashi
### 背景 現在の`Palette`型の定義はこのようになっている。 ```tsx export type Palette = { white: string; black: string; primary: PaletteColor; success: PaletteColor; warning: PaletteColor; danger: PaletteColor; gray: PaletteColor; text: PaletteText; background: PaletteBackground; divider: string; icon:...
https://github.com/voyagegroup/ingred-ui/pull/234 あたりから読みづらくなってきているのでコンポーネントごとわけたい。
## ネイティブの``にprops群を寄せたい `react-hook-form`などのフォームライブラリと併用する際にあつかいづらいため。 ```diff - export type ToggleButtonProps = { + export type ToggleButtonProps = React.ComponentPropsWithRef & { - active?: boolean; ← `checked`propsで扱う disabled?: boolean; onChange?: () => void; width?:...
#205 の変更で、`menuListProps`が含まれるため、`React.ComponentPropsWithRef`は不要となる。
例えばこんな感じ ```diff const FloatingTip: React.FunctionComponent = ({ baseElement, positionPriority = ["right-start"], offset = [0, 10], isOpen, onClose, + popoverProps, children, }) => { const theme = useTheme(); return ( {children}...
利用する側(コンポーネント)でも「選択した行」を`state`として持っているので、`state`の二重管理となる。 コードもそのせいで複雑になっている節があるので、`props`で管理したい。