Skip to content

Commit

Permalink
fix sidebar rtl
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-ubs committed Dec 11, 2024
1 parent cab0a13 commit dac7735
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Basics({ direction }: HasDirection) {

<VerticalTabsContent value="Sidebar">
<div className="tw-relative tw-overflow-hidden">
<SettingsSidebarExamples />
<SettingsSidebarExamples direction={direction} />
</div>
</VerticalTabsContent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type SidebarExamplesProps = {
direction?: string;
};

export default function SidebarExamples({ direction = 'ltr' }: SidebarExamplesProps) {
export default function SidebarExamples({ direction }: SidebarExamplesProps) {
const [sidebarSelection, setSidebarSelection] = useState('button');

const sidebarItems: { [title: string]: string } = {
Expand All @@ -31,7 +31,7 @@ export default function SidebarExamples({ direction = 'ltr' }: SidebarExamplesPr

return (
<SidebarProvider dir={direction}>
<Sidebar>
<Sidebar side={direction === 'rtl' ? 'right' : 'left'}>
<SidebarContent>
<SidebarGroup>
<SidebarGroupLabel>Application</SidebarGroupLabel>
Expand Down

0 comments on commit dac7735

Please sign in to comment.