Skip to main content
4 events
when toggle format what by license comment
Jun 23, 2019 at 9:27 comment added mrseanbaines Thanks for the help, Curtis. I utilized your tips and ended up creating a reusable type interface (which is used in a few places throughout the app): export interface ColorProps { keyword: string; hex: string; rgb: string; }. I then extended that interface and used the keyof ColorProps as the type for copyFormat: interface Props extends ColorProps { copyFormat: keyof ColorProps; onClick: (value: string) => void; }. Hope this is a valid way to do things!
Jun 23, 2019 at 9:18 vote accept mrseanbaines
Jun 23, 2019 at 9:18 vote accept mrseanbaines
Jun 23, 2019 at 9:18
Jun 23, 2019 at 6:10 history answered Curtis F CC BY-SA 4.0