Skip to content

Commit

Permalink
chore(Slider): do not show lock icon on compact sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
sjschlapbach committed Feb 5, 2025
1 parent fa72fe1 commit 068c0d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/design-system/src/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export function Slider({
'flex h-12 w-12 flex-col items-center justify-center rounded-full border-[3px] border-solid bg-white shadow-lg focus:outline-none',
compact && 'h-4 w-4 border-[1.5px]',
disabled ? 'cursor-not-allowed' : 'cursor-move',
disabled && compact ? 'bg-gray-100' : 'bg-white',
disabled ||
!borderColorMap ||
Object.keys(borderColorMap).length !== steps
Expand All @@ -169,7 +170,7 @@ export function Slider({
data-cy={dataThumb?.cy}
data-test={dataThumb?.test}
>
{disabled && (
{disabled && !compact ? (
<FontAwesomeIcon
icon={faLock}
className={twMerge(
Expand All @@ -178,7 +179,7 @@ export function Slider({
className?.lock
)}
/>
)}
) : null}
</RadixSlider.Thumb>
</RadixSlider.Root>
)
Expand Down

0 comments on commit 068c0d1

Please sign in to comment.