-
-
Notifications
You must be signed in to change notification settings - Fork 827
Improve AccessibleButton & related types #12075
Conversation
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
Signed-off-by: Michael Telatynski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks plausible
// omitted props are handled by render function | ||
interface IProps extends Omit<React.ComponentProps<typeof AccessibleTooltipButton>, "title" | "onClick" | "disabled"> { | ||
type Props = Omit<ComponentProps<typeof AccessibleTooltipButton>, "title" | "onClick" | "disabled" | "element"> & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is element
omitted here because a PlayPauseButton
can only ever be based on the default element type (div
)?
Not entirely convinced that the comment here is accurate; or indeed giving any value. Maybe remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can only ever be based on the default element type (div)?
Indeed, really I'm not sure this should be extending ComponentProps and instead should just list the ones it wants given it isn't a generic reusable component but I thought I'd apply a consistent approach rather than dig into less relevant things
Signed-off-by: Michael Telatynski <[email protected]>
Extracted from #12054
This change is marked as an internal change (Task), so will not be included in the changelog.