diff --git a/src/components/toggles/toggle/toggle.tsx b/src/components/toggles/toggle/toggle.tsx index 816b0fb7a..8881449c8 100644 --- a/src/components/toggles/toggle/toggle.tsx +++ b/src/components/toggles/toggle/toggle.tsx @@ -13,6 +13,11 @@ export interface IToggleProps extends Omit, 'ref'> { label: string; } +/** + * The Toggle component is a button that handles the "on" and "off" states. + * + * **NOTE**: The component must be used inside a `` component in order to work properly. + */ export const Toggle: React.FC = (props) => { const { className, label, value, disabled, ...otherProps } = props; diff --git a/src/components/toggles/toggleGroup/toggleGroup.stories.tsx b/src/components/toggles/toggleGroup/toggleGroup.stories.tsx index 29ea653fb..0b980779d 100644 --- a/src/components/toggles/toggleGroup/toggleGroup.stories.tsx +++ b/src/components/toggles/toggleGroup/toggleGroup.stories.tsx @@ -3,9 +3,9 @@ import { useState } from 'react'; import { Toggle } from '../toggle'; import { ToggleGroup, type IToggleGroupProps } from './toggleGroup'; -const meta: Meta = { +const meta: Meta = { title: 'components/Toggles/ToggleGroup', - component: Toggle, + component: ToggleGroup, tags: ['autodocs'], parameters: { design: {