-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(react-button): complete Button style * refactor(input): input style * fix(button): button padding style * refactor(select): select component * refactor(select): select fuzzysearch * fix(select): selectKey bug * refactor(card): card style * refactor(dialog): dialog style * fix(card & sheet): scss deprecation warning * refactor(radio): radio style * refactor(radio): disable style * update dependenices * refactor(badge): change badge style * refactor(navbar): navbar style * feat: new version * feat: pagination style * feat: toast style --------- Co-authored-by: 卜庆鑫 <buqingxin@xiaomi.com>
- Loading branch information
Showing
49 changed files
with
1,997 additions
and
1,958 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,67 @@ | ||
@use '../variables' as *; | ||
|
||
@mixin color-badge($color-name) { | ||
background-color: $color-name; | ||
color: $white-color; | ||
font-weight: bold; | ||
} | ||
|
||
.base { | ||
border-radius: $radius-5; | ||
display: inline-flex; | ||
@include shadow; | ||
transition: all $duration-100 $cubic-bezier; | ||
&:hover { | ||
opacity: 0.8; | ||
} | ||
@mixin badge-color { | ||
&.info { | ||
@include color-badge($primary-color); | ||
@include color-badge($info-color); | ||
} | ||
|
||
&.success { | ||
@include color-badge($success-color); | ||
} | ||
|
||
&.warning { | ||
@include color-badge($warning-color); | ||
} | ||
|
||
&.error { | ||
@include color-badge($danger-color); | ||
} | ||
|
||
&.ghost { | ||
@include color-badge($pale-white-color); | ||
color: $black-color; | ||
} | ||
} | ||
|
||
@mixin badge-size { | ||
&.medium { | ||
font-size: 14px; | ||
padding: 2px 11px; | ||
font-size: 1rem; | ||
padding: 0px 12px; | ||
height: 28px; | ||
border-radius: 14px; | ||
} | ||
|
||
&.large { | ||
font-size: 18px; | ||
padding: 3px 14px; | ||
font-size: 1.2rem; | ||
padding: 0px 16px; | ||
height: 32px; | ||
border-radius: 16px; | ||
} | ||
|
||
&.small { | ||
font-size: 10px; | ||
padding: 2px 8px; | ||
padding: 0px 8px; | ||
height: 24px; | ||
border-radius: 12px; | ||
font-size: 0.8rem; | ||
} | ||
} | ||
|
||
.base { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border: solid 1px $default-color; | ||
cursor: pointer; | ||
|
||
@include shadow; | ||
@include badge-color; | ||
@include badge-size; | ||
|
||
span { | ||
display: inline; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,42 @@ | ||
@use '../variables' as *; | ||
|
||
.base { | ||
background-color: $primary-color; | ||
color: $white-color; | ||
padding: 10px; | ||
border-radius: 5px; | ||
display: block; | ||
border-radius: 4px; | ||
border: none; | ||
cursor: pointer; | ||
font-size: 16px; | ||
font-weight: 400; | ||
transition: all 0.15s ease-in-out; | ||
@include shadow; | ||
transition: box-shadow $animation-time-regular $cubic-bezier; | ||
|
||
&:hover { | ||
backdrop-filter: brightness(0.85); | ||
} | ||
|
||
&:active { | ||
transform: scale(0.98); | ||
} | ||
@include color; | ||
|
||
&.primary { | ||
background-color: $primary-color; | ||
} | ||
|
||
&.secondary { | ||
background-color: $white-color; | ||
color: $primary-color; | ||
border: 1px solid $primary-color; | ||
} | ||
|
||
&.border { | ||
border: solid 1px $border-white-color; | ||
&.disabled { | ||
// all: unset; | ||
@include disabled; | ||
background-color: $white-color; | ||
color: $black-color; | ||
font-weight: 500; | ||
} | ||
|
||
&.ghost { | ||
background-color: transparent; | ||
color: $primary-color; | ||
font-weight: 600; | ||
|
||
&:hover:not(.disabled) { | ||
filter: brightness(1); | ||
backdrop-filter: brightness(0.97); | ||
} | ||
} | ||
|
||
&.danger { | ||
background-color: $danger-color; | ||
} | ||
|
||
&.disabled { | ||
cursor: not-allowed; | ||
|
||
&:hover { | ||
backdrop-filter: none; | ||
} | ||
|
||
&:active { | ||
transform: none; | ||
} | ||
&:hover { | ||
@include shadow; | ||
} | ||
|
||
&.disabledShadow { | ||
filter: grayscale(1); | ||
&:active { | ||
transform: scale(0.98); | ||
filter: blur(0.1px); | ||
} | ||
|
||
&.small { | ||
padding: 6px 7px; | ||
font-size: 12px; | ||
padding: 6px 12px; | ||
font-size: 0.8rem; | ||
} | ||
|
||
&.medium { | ||
padding: 8px 10px; | ||
font-size: 16px; | ||
font-size: 1rem; | ||
padding: 8px 16px; | ||
} | ||
|
||
&.large { | ||
padding: 15px 18px; | ||
font-size: 20px; | ||
padding: 10px 20px; | ||
font-size: 1.2rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.