Skip to content

Commit a6e5c70

Browse files
authored
fix: props of 'ThemedDivider' in TAILWIND.md (#870)
* fix: 'ThemedDivider' in TAILWIND.md * fix: format
1 parent 3a139c1 commit a6e5c70

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

TAILWIND.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,26 @@ Create a themed divider component using shadcn's `cn` utility:
5151
import { cn } from '@/lib/utils';
5252
import type { DividerProps } from 'react-split-pane';
5353

54-
function ThemedDivider({ direction, isDragging, disabled, ...props }: DividerProps) {
54+
function ThemedDivider(props: DividerProps) {
55+
const {
56+
direction,
57+
isDragging,
58+
disabled,
59+
onMouseDown,
60+
onTouchStart,
61+
onTouchEnd,
62+
onKeyDown,
63+
} = props;
64+
5565
return (
5666
<div
67+
role="separator"
68+
aria-orientation={direction === 'horizontal' ? 'vertical' : 'horizontal'}
69+
tabIndex={disabled ? -1 : 0}
70+
onMouseDown={disabled ? undefined : onMouseDown}
71+
onTouchStart={disabled ? undefined : onTouchStart}
72+
onTouchEnd={disabled ? undefined : onTouchEnd}
73+
onKeyDown={disabled ? undefined : onKeyDown}
5774
className={cn(
5875
'flex items-center justify-center transition-colors',
5976
'bg-border hover:bg-accent focus:outline-none focus:ring-2 focus:ring-ring',
@@ -63,7 +80,6 @@ function ThemedDivider({ direction, isDragging, disabled, ...props }: DividerPro
6380
isDragging && 'bg-primary',
6481
disabled && 'cursor-not-allowed opacity-50'
6582
)}
66-
{...props}
6783
/>
6884
);
6985
}

0 commit comments

Comments
 (0)