globalbrain / sefirot

Global Brain Design System.
https://sefirot.globalbrains.com
MIT License
151 stars 12 forks source link

[Table] Add a way to highlight selected row #483

Closed kiaking closed 5 months ago

kiaking commented 6 months ago

When making table selectable, it would be cool if we can highlight that row. Not sure how API should look like.

I think the bg color should be set to --c-bg-mute-1 in order to distinguish from hover style. But maybe it makes texts harder to read... so --c-bg-elv-4 could be enough 🤔

brc-dd commented 5 months ago

hover has --c-bg-elv-4 -- it'd be same for both then 👀

https://github.com/globalbrain/sefirot/blob/ad21b8cce1d116efbdaecee0aae2ad69a5226b77/lib/components/STableCell.vue#L134-L135

kiaking commented 5 months ago

@brc-dd Yeah it would. So, the down side is user will not notice the change until they remove the mouse from that row after selecting it 👀 But... I think it would be noticeable enough. I hope 🙏