-
Notifications
You must be signed in to change notification settings - Fork 2
Table #1437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Table #1437
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vi kanskje burde legge til støtte for table <caption>
? https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/caption
29eb3f2
to
1ed6963
Compare
<ChevronRight className="mt-0.25 h-6 w-full text-black " /> | ||
</div> | ||
} | ||
<ScrollButton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skulle inte detta vara en egen PR?
packages/react/src/table/table.tsx
Outdated
}); | ||
|
||
// Context for sharing table variant with child components | ||
const TableContext = createContext<{ variant: 'default' | 'zebra' }>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vi behöver inte Context
här, det kommer bara att dra ner performance. Vi kan lösa det med ett data-attribut och tailwind istället. Ska funka med group-data-*
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh smart
type TableColumnProps as UNSAFE_TableColumnProps, | ||
type TableHeaderProps as UNSAFE_TableHeaderProps, | ||
type TableProps as UNSAFE_TableProps, | ||
type TableRowProps as UNSAFE_TableRowProps, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vi må lage en enkel TableCaption
her og som vi kan eksportere
This pull request introduces a new, accessible table component system to the React package, providing a set of composable table primitives with built-in horizontal scrolling, keyboard navigation, and WCAG compliance. The changes include the implementation of the table components, their export from the package, and comprehensive Storybook stories demonstrating usage and features.
We use the same composition as in other grunnmuren-components, where the user "builds their own table", and the children are the cells.
Uses the same scrolling and responsiveness as Tabs!
Screen.Recording.2025-09-29.at.13.37.31.mov