Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COM-85: Allow extending slots from Admin components #1444

Conversation

jamesricky
Copy link
Contributor

@jamesricky jamesricky commented Nov 27, 2023

Extending a Comet Admin component using styled() requires the className prop to be passed through to the components root slot.

Also added the ThemedComponentBaseProps type to use as a base for components props.
This abstracts away the need to manually define the sx, className and slotProps props in every component.

@jamesricky jamesricky force-pushed the allow-slots-to-extend-admin-components branch from 4d1ddf3 to 1c6694d Compare November 28, 2023 12:43
johnnyomair
johnnyomair previously approved these changes Nov 28, 2023
Extending a Comet Admin component using `styled()` requires the
`className` prop to be passed through to the components `root` slot.

Also added the `ThemedComponentBaseProps` type to use as a base for
components props. This abstracts away the need to manually define the
`sx`, `className` and `slotProps` props in every component.
@jamesricky jamesricky merged commit eff7cf1 into feature/refactor-admin-component-theming Nov 28, 2023
@jamesricky jamesricky deleted the allow-slots-to-extend-admin-components branch November 28, 2023 14:37
jamesricky added a commit that referenced this pull request Jan 9, 2024
Extending a Comet Admin component using `styled()` requires the
`className` prop to be passed through to the components `root` slot.

Also added the `ThemedComponentBaseProps` type to use as a base for
components props.
This abstracts away the need to manually define the `sx`, `className`
and `slotProps` props in every component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants