diff --git a/packages/eds-core-react/src/components/SideSheet/SideSheet.tsx b/packages/eds-core-react/src/components/SideSheet/SideSheet.tsx index 4388ce3ddc..bce120d240 100644 --- a/packages/eds-core-react/src/components/SideSheet/SideSheet.tsx +++ b/packages/eds-core-react/src/components/SideSheet/SideSheet.tsx @@ -22,6 +22,8 @@ export type SideSheetProps = { onClose?: (Event) => void /** Open / close Side Sheet */ open?: boolean + /** Override width of Side Sheet */ + width?: string } & HTMLAttributes const StyledSideSheet = styled.div` @@ -49,13 +51,21 @@ const Header = styled.div` export const SideSheet = forwardRef( function SideSheet( - { variant = 'medium', title = '', children, open = true, onClose, ...rest }, + { + variant = 'medium', + width, + title = '', + children, + open = true, + onClose, + ...rest + }, ref, ) { const props = { ...rest, ref, - width: variants[variant], + width: width || variants[variant], } // Controller must set open={false} when pressing the close button