MCPcopy Create free account
hub / github.com/bytebase/dbhub / Toggle

Function Toggle

frontend/src/components/ui/toggle-group.tsx:57–81  ·  view source on GitHub ↗
({
  className,
  children,
  variant,
  size,
  ...props
}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>)

Source from the content-addressed store, hash-verified

55}
56
57function Toggle({
58 className,
59 children,
60 variant,
61 size,
62 ...props
63}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>) {
64 const context = React.useContext(ToggleGroupContext);
65
66 const resolvedVariant = context.variant || variant;
67 const resolvedSize = context.size || size;
68
69 return (
70 <ToggleComponent
71 className={className}
72 data-size={resolvedSize}
73 data-variant={resolvedVariant}
74 size={resolvedSize}
75 variant={resolvedVariant}
76 {...props}
77 >
78 {children}
79 </ToggleComponent>
80 );
81}
82
83function ToggleGroupSeparator({
84 className,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected