File tree Expand file tree Collapse file tree
examples/ui-playground/src/app/playground/shadcn
packages/ui/src/components/primitives Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' @example/ui-playground ' : patch
3+ ' @genseki/ui ' : patch
4+ ---
5+
6+ fix: separator class overriding.
Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ function BasicSeparatorExamples() {
1414 </ div >
1515 < div className = "flex h-24 items-center gap-4" >
1616 < span className = "text-sm text-muted-foreground" > Top</ span >
17- < Separator orientation = "vertical" className = "h-full" />
17+ < Separator
18+ orientation = "vertical"
19+ className = "bg-blue-500 data-[orientation=vertical]:w-4"
20+ />
1821 < span className = "text-sm text-muted-foreground" > Bottom</ span >
1922 </ div >
2023 < div className = "flex items-center gap-4" >
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import React from 'react'
44import * as SeparatorPrimitive from '@radix-ui/react-separator'
55import { cva , type VariantProps } from 'class-variance-authority'
66
7+ import { cn } from '../../utils/cn'
8+
79/**
810 * Shadcn component
911 */
@@ -39,7 +41,7 @@ function Separator({
3941 data-slot = "separator"
4042 decorative = { decorative }
4143 orientation = { orientation }
42- className = { separator ( { variant, className } ) }
44+ className = { cn ( separator ( { variant } ) , className ) }
4345 { ...props }
4446 />
4547 )
You can’t perform that action at this time.
0 commit comments