Skip to content

Commit

Permalink
feat: support segmented fallback less (#6703)
Browse files Browse the repository at this point in the history
* feat: support segmented fallback less

* chore: update
  • Loading branch information
vagusX authored Aug 7, 2024
1 parent ff66628 commit 2bb5af4
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/components/segmented/segmented.patch.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@class-prefix-segmented: ~'adm-segmented';

.@{class-prefix-segmented} {
color: #666;
background-color: #f5f5f5;
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);

&-item {
transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);

&-selected {
.segmented-item-selected();
color: #333;
}
}

// disabled styles
&-item-disabled {
.segmented-disabled-item();
}

// thumb styles
&-thumb {
.segmented-item-selected();
}

// transition effect when `appear-active`
&-thumb-motion-appear-active {
transition:
transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1),
width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}
}

/* ---- mixins part starts ---- */
.segmented-disabled-item {
color: #999;
}

.segmented-item-selected {
background-color: #fff;
box-shadow:
0 2px 8px -2px fade(#000, 5%),
0 1px 4px -1px fade(#000, 7%),
0 0 1px 0 fade(#000, 8%);
}

/* ---- mixins part ends ---- */
1 change: 1 addition & 0 deletions src/global/css-vars-patch.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
@import '../components/popover/popover.patch.less';
@import '../components/scroll-mask/scroll-mask.patch.less';
@import '../components/space/space.patch.less';
@import '../components/segmented/segmented.patch.less';
@import '../components/spin-loading/spin-loading.patch.less';
@import '../components/swiper/swiper.patch.less';
@import '../components/tabs/tabs.patch.less';
Expand Down

0 comments on commit 2bb5af4

Please sign in to comment.