Skip to content

Commit cd8be2d

Browse files
committed
fix(theme): revise slider display with hideThumb
1 parent 0b0f213 commit cd8be2d

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

packages/core/theme/src/components/slider.ts

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,12 @@ const slider = tv({
311311
"w-7 mx-[calc((theme(spacing.7)-theme(spacing.5))/2)] border-y-[calc(theme(spacing.7)/2)]",
312312
},
313313
},
314-
// color && !isVertical && hasSingleThumb
314+
// color && !isVertical && hasSingleThumb & !hideThumb
315315
{
316316
color: "foreground",
317317
isVertical: false,
318318
hasSingleThumb: true,
319+
hideThumb: false,
319320
class: {
320321
track: "border-s-foreground",
321322
},
@@ -324,6 +325,7 @@ const slider = tv({
324325
color: "primary",
325326
isVertical: false,
326327
hasSingleThumb: true,
328+
hideThumb: false,
327329
class: {
328330
track: "border-s-primary",
329331
},
@@ -332,6 +334,7 @@ const slider = tv({
332334
color: "secondary",
333335
isVertical: false,
334336
hasSingleThumb: true,
337+
hideThumb: false,
335338
class: {
336339
track: "border-s-secondary",
337340
},
@@ -340,6 +343,7 @@ const slider = tv({
340343
color: "success",
341344
isVertical: false,
342345
hasSingleThumb: true,
346+
hideThumb: false,
343347
class: {
344348
track: "border-s-success",
345349
},
@@ -348,6 +352,7 @@ const slider = tv({
348352
color: "warning",
349353
isVertical: false,
350354
hasSingleThumb: true,
355+
hideThumb: false,
351356
class: {
352357
track: "border-s-warning",
353358
},
@@ -356,10 +361,55 @@ const slider = tv({
356361
color: "danger",
357362
isVertical: false,
358363
hasSingleThumb: true,
364+
hideThumb: false,
359365
class: {
360366
track: "border-s-danger",
361367
},
362368
},
369+
// color && hideThumb
370+
{
371+
color: "foreground",
372+
hideThumb: true,
373+
class: {
374+
track:
375+
"data-[fill-start=true]:border-s-foreground data-[fill-end=true]:border-e-foreground",
376+
},
377+
},
378+
{
379+
color: "primary",
380+
hideThumb: true,
381+
class: {
382+
track: "data-[fill-start=true]:border-s-primary data-[fill-end=true]:border-e-primary",
383+
},
384+
},
385+
{
386+
color: "secondary",
387+
hideThumb: true,
388+
class: {
389+
track: "data-[fill-start=true]:border-s-secondary data-[fill-end=true]:border-e-secondary",
390+
},
391+
},
392+
{
393+
color: "success",
394+
hideThumb: true,
395+
class: {
396+
track: "data-[fill-start=true]:border-s-success data-[fill-end=true]:border-e-success",
397+
},
398+
},
399+
{
400+
color: "warning",
401+
hideThumb: true,
402+
class: {
403+
track: "data-[fill-start=true]:border-s-warning data-[fill-end=true]:border-e-warning",
404+
},
405+
},
406+
{
407+
color: "danger",
408+
hideThumb: true,
409+
class: {
410+
track: "data-[fill-start=true]:border-s-danger data-[fill-end=true]:border-e-danger",
411+
},
412+
},
363413
// color && isVertical && hasSingleThumb
364414
{
365415
color: "foreground",

0 commit comments

Comments
 (0)