diff --git a/docs/registry/ui/action-chip.tsx b/docs/registry/ui/action-chip.tsx index c67d76e49..63347db55 100644 --- a/docs/registry/ui/action-chip.tsx +++ b/docs/registry/ui/action-chip.tsx @@ -14,10 +14,20 @@ export interface ActionChipProps extends SeedActionChip.RootProps { } export const ActionChip = React.forwardRef( - ({ children, prefixIcon, suffixIcon, count, ...otherProps }, ref) => { + ( + { + children, + prefixIcon, + suffixIcon, + count, + layout = "withText", + ...otherProps + }, + ref, + ) => { return ( - - {otherProps.layout === "withText" ? ( + + {layout === "withText" ? ( <> {prefixIcon && } {children} diff --git a/docs/registry/ui/control-chip.tsx b/docs/registry/ui/control-chip.tsx index eab843980..3e9e4a9a7 100644 --- a/docs/registry/ui/control-chip.tsx +++ b/docs/registry/ui/control-chip.tsx @@ -16,22 +16,34 @@ export interface ControlChipToggleProps extends SeedControlChip.RootProps { export const ControlChipToggle = React.forwardRef< HTMLLabelElement, ControlChipToggleProps ->(({ children, prefixIcon, suffixIcon, count, ...otherProps }, ref) => { - return ( - - {otherProps.layout === "withText" ? ( - <> - {prefixIcon && } - {children} - {count && {count}} - {suffixIcon && } - - ) : ( - - )} - - ); -}); +>( + ( + { + children, + prefixIcon, + suffixIcon, + count, + layout = "withText", + ...otherProps + }, + ref, + ) => { + return ( + + {layout === "withText" ? ( + <> + {prefixIcon && } + {children} + {count && {count}} + {suffixIcon && } + + ) : ( + + )} + + ); + }, +); ControlChipToggle.displayName = "ControlChip.Toggle"; export const ControlChip = Object.assign( diff --git a/examples/stackflow-spa/src/design-system/ui/action-chip.tsx b/examples/stackflow-spa/src/design-system/ui/action-chip.tsx index 28465d340..543865fe0 100644 --- a/examples/stackflow-spa/src/design-system/ui/action-chip.tsx +++ b/examples/stackflow-spa/src/design-system/ui/action-chip.tsx @@ -14,10 +14,10 @@ export interface ActionChipProps extends SeedActionChip.RootProps { } export const ActionChip = React.forwardRef( - ({ className, children, prefixIcon, suffixIcon, count, ...otherProps }, ref) => { + ({ children, prefixIcon, suffixIcon, count, layout = "withText", ...otherProps }, ref) => { return ( - - {otherProps.layout === "withText" ? ( + + {layout === "withText" ? ( <> {prefixIcon && } {children} diff --git a/examples/stackflow-spa/src/design-system/ui/control-chip.tsx b/examples/stackflow-spa/src/design-system/ui/control-chip.tsx index 4df6c4e21..13f0c5b8e 100644 --- a/examples/stackflow-spa/src/design-system/ui/control-chip.tsx +++ b/examples/stackflow-spa/src/design-system/ui/control-chip.tsx @@ -14,10 +14,10 @@ export interface ControlChipToggleProps extends SeedControlChip.RootProps { } export const ControlChipToggle = React.forwardRef( - ({ className, children, prefixIcon, suffixIcon, count, ...otherProps }, ref) => { + ({ children, prefixIcon, suffixIcon, count, layout = "withText", ...otherProps }, ref) => { return ( - - {otherProps.layout === "withText" ? ( + + {layout === "withText" ? ( <> {prefixIcon && } {children}