carbon-design-system / carbon-website

The website for the Carbon Design System.
https://www.carbondesignsystem.com
Apache License 2.0
283 stars 784 forks source link

[Docs] : Showing the right alignment of the numbers in data table component #3831

Open Kritvi-bhatia opened 11 months ago

Kritvi-bhatia commented 11 months ago

Acceptance criteria

Vertical alignment for numbers in data table


Use case

image


References

For references, I'm attaching 2 screenshots one from Material design system and other from IBM product which has a section about this under their data table extension.

Material Design

image

IBM Product (data table extension)

Screenshot 2023-12-06 at 4 33 05 PM
tay1orjones commented 11 months ago

I see you've labelled this as just docs, which I think make sense. I don't think we need to make this a prop on TableCell, but to achieve this developers will have to place text-align: end on every TableCell that needs it, along with the TableHeader at the top of the column.

We could add a section to the storybook documentation in DataTable.mdx to clearly state this and highlight it's the approach to achieve the design spec outlined on the website.