carbon
carbon copied to clipboard
Sidebar custom sizes
Desired behaviour
It should accept the same values as other components (as the Box, for example).
This way we can change the with using px, vw or percentages and we can adapt the size to each responsive size.
Current behaviour
Currently, there are 6 predefined sizes extra-small; small; medium-small; medium; medium-large; large; extra-large.
Suggested Solution
SBS-40387
CodeSandbox or Storybook URL
It's a default carbon component
Anything else we should know?
We have a Figma resource created by SD. I can't paste here any reference to it.
Confidentiality
- [X] I confirm there is no confidential or commercially sensitive information included.
Hi @rawlmp, similarly with issue #5394, I could imagine because this is default styling with the Sidebar
component, that the size of sidebar should be kept as it is. Unless DS have given us official approval to introduce this, it could potentially lead to inconsistency among products.
@ljemmo @harpalsingh is something we would like to introduce?
@Parsium and @rawlmp will need more context before i can review. Pelase can you share a spec or design.
In our repo we need to define sidebar width to be "auto" for mobile screen sizes to support a responsive UI, could we do this, please?
Having reviewed @lukepricesage designs, i think adding an optional width prop that allows passing of custom width depending on resolution makes sense. Just to confirm @StylianosKoidakisSage - this wouldn't replace the fixed width sizes that we currently support - rather it would be an additional prop that could override these?
@ljemmo with regards to the existing size
prop for Sidebar
- one potential solution would be to create a codemod that consumers can run on their code that renames the size
prop to a width
prop with a particular value. I'll add this to our backlog for now and we will discuss options in our refinement session
FE-5359
Fixed in https://github.com/Sage/carbon/pull/5604