Skip to content

Commit

Permalink
fix: add RTL support to the modal component
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbadri committed Mar 8, 2024
1 parent a686262 commit b0dae69
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/famous-owls-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/table": patch
---

Add RTL support to the table component.
22 changes: 21 additions & 1 deletion packages/core/theme/src/components/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,19 @@ const table = tv({
"px-3",
"h-10",
"text-left",
"rtl:text-right",
"align-middle",
"bg-default-100",
"whitespace-nowrap",
"text-foreground-500",
"text-tiny",
"font-semibold",
"first:rounded-l-lg",
"rtl:first:rounded-r-lg",
"rtl:first:rounded-l-[unset]",
"last:rounded-r-lg",
"rtl:last:rounded-l-lg",
"rtl:last:rounded-r-[unset]",
"outline-none",
"data-[sortable=true]:transition-colors",
"data-[sortable=true]:cursor-pointer",
Expand Down Expand Up @@ -208,16 +213,31 @@ const table = tv({
td: [
// first
"group-data-[first=true]:first:before:rounded-tl-lg",
"group-data-[first=true]:rtl:first:before:rounded-tr-lg",
"group-data-[first=true]:rtl:first:before:rounded-tl-[unset]",
"group-data-[first=true]:last:before:rounded-tr-lg",
"group-data-[first=true]:rtl:last:before:rounded-tl-lg",
"group-data-[first=true]:rtl:last:before:rounded-tr-[unset]",
// middle
"group-data-[middle=true]:before:rounded-none",
// last
"group-data-[last=true]:first:before:rounded-bl-lg",
"group-data-[last=true]:rtl:first:before:rounded-br-lg",
"group-data-[last=true]:rtl:first:before:rounded-bl-[unset]",
"group-data-[last=true]:last:before:rounded-br-lg",
"group-data-[last=true]:rtl:last:before:rounded-bl-lg",
"group-data-[last=true]:rtl:last:before:rounded-br-[unset]",
],
},
false: {
td: ["first:before:rounded-l-lg", "last:before:rounded-r-lg"],
td: [
"first:before:rounded-l-lg",
"rtl:first:before:rounded-r-lg",
"rtl:first:before:rounded-l-[unset]",
"last:before:rounded-r-lg",
"rtl:last:before:rounded-l-lg",
"rtl:last:before:rounded-r-[unset]",
],
},
},
fullWidth: {
Expand Down

0 comments on commit b0dae69

Please sign in to comment.