-
Notifications
You must be signed in to change notification settings - Fork 113
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
[sparkle] - enh: DataTable
#6622
Conversation
…aTable - Added a new `initialColumnOrder` prop to `DataTable` component for setting the initial state of column sorting - Updated `DataTable` stories to demonstrate usage with the new `initialColumnOrder` property
- Adjust the size of the sorting icon to 'xs' to improve visual appearance - Streamline opacity control for better clarity when the column is sorted or not
- Added a hover style to DataTable rows to indicate interactivity when 'onMoreClick' is provided - The hover style changes the border bottom color and applies opacity for better visual feedback
- Update the project version in package-lock.json and package.json for new release
6150f4c
to
3fa71be
Compare
sparkle/src/components/DataTable.tsx
Outdated
@@ -197,7 +202,9 @@ DataTable.Row = function Row({ | |||
<tr | |||
className={classNames( | |||
"s-border-b s-border-structure-200 s-text-sm", | |||
onClick ? "s-cursor-pointer" : "", | |||
onClick | |||
? "s-cursor-pointer hover:s-border-b-neutral-500 hover:s-opacity-70" |
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.
Maybe let's only do the border, opacity drop looks a little odd no?
The best would be to add a light grey background to the child 's
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.
@albandum something like this?
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.
Much better - no need for the border change anymore
Remove the border change and mergeable 👍
- Added a gray background to rows on hover to enhance the visibility of the currently selected row
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.
Address border change comment and go 👍
- Simplify hover state CSS by removing border color change on row clickability indication.
* [sparkle] - feature: allow initial column order configuration for DataTable - Added a new `initialColumnOrder` prop to `DataTable` component for setting the initial state of column sorting - Updated `DataTable` stories to demonstrate usage with the new `initialColumnOrder` property * [sparkle] - refactor: update icon size and opacity logic in DataTable - Adjust the size of the sorting icon to 'xs' to improve visual appearance - Streamline opacity control for better clarity when the column is sorted or not * [sparkle] - feature: enhance row hover effect in DataTable component - Added a hover style to DataTable rows to indicate interactivity when 'onMoreClick' is provided - The hover style changes the border bottom color and applies opacity for better visual feedback * [sparkle] - feature: bump package version to 0.2.200 - Update the project version in package-lock.json and package.json for new release * [sparkle] - fix: improve row hover visual feedback in DataTable - Added a gray background to rows on hover to enhance the visibility of the currently selected row * [sparkle] - refactor: streamline DataTable row hover styling - Simplify hover state CSS by removing border color change on row clickability indication. --------- Co-authored-by: Jules <[email protected]>
Description
This PR aims at enhancing the
DataTable
component, which includes:Risk
Breaking UI
Deploy Plan
front
in another PR