diff --git a/playbook/app/pb_kits/playbook/pb_drawer/_drawer.tsx b/playbook/app/pb_kits/playbook/pb_drawer/_drawer.tsx index 314959b713..23d53d4e77 100644 --- a/playbook/app/pb_kits/playbook/pb_drawer/_drawer.tsx +++ b/playbook/app/pb_kits/playbook/pb_drawer/_drawer.tsx @@ -287,7 +287,6 @@ const Drawer = (props: DrawerProps): React.ReactElement => { {...ariaProps} {...dataProps} {...htmlProps} - style={dynamicInlineProps} className={classnames(drawerClassNames.base, { [drawerClassNames.afterOpen]: animationState === "afterOpen", @@ -296,6 +295,7 @@ const Drawer = (props: DrawerProps): React.ReactElement => { })} id={id} onClick={(e) => e.stopPropagation()} + style={dynamicInlineProps} > {children} @@ -306,7 +306,6 @@ const Drawer = (props: DrawerProps): React.ReactElement => { {...dataProps} {...htmlProps} className={classes} - style={dynamicInlineProps} > {isModalVisible && (
{ animationState === "beforeClose", })} onClick={(e) => e.stopPropagation()} + style={dynamicInlineProps} > {children}
diff --git a/playbook/app/pb_kits/playbook/pb_layout/_layout.tsx b/playbook/app/pb_kits/playbook/pb_layout/_layout.tsx index 5d7fa88029..56fb6120af 100755 --- a/playbook/app/pb_kits/playbook/pb_layout/_layout.tsx +++ b/playbook/app/pb_kits/playbook/pb_layout/_layout.tsx @@ -24,34 +24,37 @@ type LayoutPropTypes = { type LayoutSideProps = { children: React.ReactNode[] | React.ReactNode, className?: string, -} +} & GlobalProps type LayoutBodyProps = { children: React.ReactNode[] | React.ReactNode, className?: string, -} +} & GlobalProps type LayoutItemProps = { children: React.ReactNode[] | React.ReactNode, className?: string, size?: "sm" | "md" | "lg" -} +} & GlobalProps type LayoutHeaderProps = { children: React.ReactNode[] | React.ReactNode, className?: string, -} +} & GlobalProps type LayoutFooterProps = { children: React.ReactNode[] | React.ReactNode, className?: string, -} +} & GlobalProps -// Side component const Side = (props: LayoutSideProps) => { const { children, className } = props + const dynamicInlineProps = globalInlineProps(props) return ( -
+
{children}
) @@ -60,8 +63,12 @@ const Side = (props: LayoutSideProps) => { // Body component const Body = (props: LayoutBodyProps) => { const { children, className } = props + const dynamicInlineProps = globalInlineProps(props) return ( -
+
{children}
) @@ -71,8 +78,12 @@ const Body = (props: LayoutBodyProps) => { const Item = (props: LayoutItemProps) => { const { children, className, size = 'sm' } = props const sizeClass = `size_${size}` + const dynamicInlineProps = globalInlineProps(props) return ( -
+
{children}
) @@ -81,8 +92,12 @@ const Item = (props: LayoutItemProps) => { // Header component const Header = (props: LayoutHeaderProps) => { const { children, className } = props + const dynamicInlineProps = globalInlineProps(props) return ( -
+
{children}
) @@ -91,8 +106,12 @@ const Header = (props: LayoutHeaderProps) => { // Footer component const Footer = (props: LayoutFooterProps) => { const { children, className } = props + const dynamicInlineProps = globalInlineProps(props) return ( -
+
{children}
)