ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / packages/design-system/components/shadcn/toggle-group.tsx

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / packages/design-system/components/shadcn/toggle-group.tsx
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberpackages/design-system/components/shadcn/toggle-group.tsx
Original SHA-256cafd2b13e7db4aea205af3858102a9f73a3207e463349e66d9eecf6952c25711
Git blob SHAbe7dcdc28bf04c9ca5f84fe9afd2bce04ddf74d6
Reading-copy SHA-256cafd2b13e7db4aea205af3858102a9f73a3207e463349e66d9eecf6952c25711

Original source ↗

Recovered source transcript

'use client' import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group' import type { VariantProps } from 'class-variance-authority' import * as React from 'react' import { cn } from '../../lib/utils' import { toggleVariants } from './toggle' const ToggleGroupContext = React.createContext<VariantProps<typeof toggleVariants>>({ size: 'default', variant: 'default' }) function ToggleGroup({ className, variant, size, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants>) { return ( <ToggleGroupPrimitive.Root data-slot="toggle-group" data-variant={variant} data-size={size} className={cn( 'group/toggle-group flex items-center rounded-md data-[variant=outline]:shadow-xs', className )} {...props} > <ToggleGroupContext.Provider value={{ variant, size }}> {children} </ToggleGroupContext.Provider> </ToggleGroupPrimitive.Root> ) } function ToggleGroupItem({ className, children, variant, size, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants>) { const context = React.useContext(ToggleGroupContext) return ( <ToggleGroupPrimitive.Item data-slot="toggle-group-item" data-variant={context.variant || variant} data-size={context.size || size} className={cn( toggleVariants({ variant: context.variant || variant, size: context.size || size }), 'min-w-0 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l', className )} {...props} > {children} </ToggleGroupPrimitive.Item> ) } export { ToggleGroup, ToggleGroupItem }

Search equations, builds, manuscript text, and recovered sources.