Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Improve AccessibleButton & related types #12075

Merged
merged 4 commits into from
Dec 20, 2023
Merged

Improve AccessibleButton & related types #12075

merged 4 commits into from
Dec 20, 2023

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Dec 20, 2023

Extracted from #12054


This change is marked as an internal change (Task), so will not be included in the changelog.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks plausible

Comment on lines 24 to 25
// 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"> & {
Copy link
Member

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?

Copy link
Member Author

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]>
@t3chguy t3chguy enabled auto-merge December 20, 2023 14:19
@t3chguy t3chguy added this pull request to the merge queue Dec 20, 2023
Merged via the queue into develop with commit af31965 Dec 20, 2023
19 checks passed
@t3chguy t3chguy deleted the t3chguy/cr/157-6 branch December 20, 2023 15:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants