fix(ui): extend ContainerProps with native div element props
Container renders a div and spreads restProps onto it, but ContainerProps didn't extend native div props. This meant attributes like aria-*, data-*, role, etc. couldn't be passed with type safety. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -23,7 +23,9 @@ export type ContainerOwnProps = {
|
||||
};
|
||||
|
||||
/** @public */
|
||||
export interface ContainerProps extends ContainerOwnProps {
|
||||
export interface ContainerProps
|
||||
extends ContainerOwnProps,
|
||||
Omit<React.ComponentPropsWithoutRef<'div'>, keyof ContainerOwnProps> {
|
||||
my?: SpaceProps['my'];
|
||||
mb?: SpaceProps['mb'];
|
||||
mt?: SpaceProps['mt'];
|
||||
|
||||
Reference in New Issue
Block a user