Skip to content

Commit

Permalink
fix(Switch): add tooltip styling for switch component
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschlapbach committed Aug 15, 2024
1 parent 8844e3f commit 8779313
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/design-system/src/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface SwitchClassName {
element?: string
thumb?: string
label?: string
tooltip?: string
}

export interface SwitchProps {
Expand Down Expand Up @@ -103,7 +104,10 @@ export function Switch({
>
{labelLeft && label && (
<FormLabel
className={{ label: twMerge('mr-0', className?.label) }}
className={{
label: twMerge('mr-0', className?.label),
tooltip: className?.tooltip,
}}
label={label}
labelType="large"
required={required}
Expand Down Expand Up @@ -142,7 +146,7 @@ export function Switch({
</RadixSwitch.Root>
{!labelLeft && label && (
<FormLabel
className={{ label: className?.label }}
className={{ label: className?.label, tooltip: className?.tooltip }}
label={label}
labelType="large"
required={required}
Expand Down

0 comments on commit 8779313

Please sign in to comment.