feat: 定义button,form等组件样式
This commit is contained in:
161
src/styles/components/ant-button.scss
Normal file
161
src/styles/components/ant-button.scss
Normal file
@ -0,0 +1,161 @@
|
||||
.ant-btn {
|
||||
border-radius: 2px !important;
|
||||
border: 1px solid #d7d7d9 !important;
|
||||
color: #3c4043 !important;
|
||||
font-family: $font-family-regular;
|
||||
font-size: 14px !important;
|
||||
font-style: normal;
|
||||
font-weight: 400 !important;
|
||||
line-height: 22px !important;
|
||||
padding: 0 16px;
|
||||
&.ant-btn-lg {
|
||||
height: 36px;
|
||||
padding: 0 20px;
|
||||
}
|
||||
&.ant-btn-sm {
|
||||
padding: 0 16px;
|
||||
height: 28px;
|
||||
}
|
||||
}
|
||||
.ant-btn-default {
|
||||
&:disabled {
|
||||
border-color: #f2f3f5 !important;
|
||||
color: #b1b2b5 !important;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
border-color: #e6e6e8 !important;
|
||||
color: #737478 !important;
|
||||
}
|
||||
}
|
||||
&.ant-btn-dangerous {
|
||||
border-color: $color-error !important;
|
||||
color: $color-error !important;
|
||||
&:disabled {
|
||||
background-color: $color-error-3 !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
border-color: $color-error-5 !important;
|
||||
color: $color-error-5 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn-primary {
|
||||
background-color: $color-primary !important;
|
||||
border-color: transparent !important;
|
||||
color: #fff !important;
|
||||
&:disabled {
|
||||
color: #fff !important;
|
||||
border-color: transparent !important;
|
||||
background-color: $color-primary-3 !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
color: #fff !important;
|
||||
border-color: transparent !important;
|
||||
background-color: $color-primary-5 !important;
|
||||
}
|
||||
&:focus-visible {
|
||||
outline: none;
|
||||
outline-offset: unset;
|
||||
}
|
||||
}
|
||||
&.ant-btn-dangerous {
|
||||
background-color: $color-error !important;
|
||||
&:disabled {
|
||||
background-color: $color-error-3 !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
background-color: $color-error-5 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn-outline {
|
||||
border: 1px solid $color-primary !important;
|
||||
color: $color-primary !important;
|
||||
&:disabled {
|
||||
border-color: $color-primary-3 !important;
|
||||
color: $color-primary-3 !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
border-color: $color-primary-5 !important;
|
||||
color: $color-primary-5 !important;
|
||||
}
|
||||
}
|
||||
&.ant-btn-dangerous {
|
||||
border: 1px solid $color-error !important;
|
||||
color: $color-error !important;
|
||||
&:disabled {
|
||||
border-color: $color-error-3 !important;
|
||||
color: $color-error-3 !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
border-color: $color-error-5 !important;
|
||||
color: $color-error-5 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn-text {
|
||||
background-color: transparent !important;
|
||||
border-color: transparent !important;
|
||||
color: $color-primary !important;
|
||||
&:disabled {
|
||||
color: $color-primary-2 !important;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
color: $color-primary-5 !important;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
}
|
||||
&.ant-btn-dangerous {
|
||||
color: $color-error !important;
|
||||
&:disabled {
|
||||
color: $color-error-2 !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
color: $color-error-5 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ant-btn-link {
|
||||
background-color: transparent !important;
|
||||
border-color: transparent !important;
|
||||
color: $color-primary !important;
|
||||
&:disabled {
|
||||
color: $color-primary-2 !important;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
color: $color-primary-5 !important;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
}
|
||||
&.ant-btn-dangerous {
|
||||
color: $color-error !important;
|
||||
&:disabled {
|
||||
color: $color-error-2 !important;
|
||||
}
|
||||
&:not(:disabled) {
|
||||
&:hover {
|
||||
color: $color-error-5 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
34
src/styles/components/ant-form.scss
Normal file
34
src/styles/components/ant-form.scss
Normal file
@ -0,0 +1,34 @@
|
||||
.ant-form {
|
||||
.ant-form-item {
|
||||
margin-bottom: 0;
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 16px !important;
|
||||
}
|
||||
.ant-form-item-row {
|
||||
.ant-form-item-label {
|
||||
margin-right: 12px;
|
||||
> label {
|
||||
color: #211f24;
|
||||
font-family: $font-family-regular;
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
&::before {
|
||||
margin-inline-end: unset;
|
||||
color: #f64b31;
|
||||
margin-right: 4px;
|
||||
font-size: 14px;
|
||||
font-family: $font-family-regular;
|
||||
line-height: 22px;
|
||||
}
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-form-item-control {
|
||||
}
|
||||
}
|
||||
}
|
||||
42
src/styles/components/ant-modal.scss
Normal file
42
src/styles/components/ant-modal.scss
Normal file
@ -0,0 +1,42 @@
|
||||
.ant-modal {
|
||||
.ant-modal-content {
|
||||
padding: 0;
|
||||
.ant-modal-header {
|
||||
border-bottom: 1px solid var(--Border-1, #d7d7d9);
|
||||
height: 56px;
|
||||
padding: 0 20px;
|
||||
margin-bottom: 0;
|
||||
color: inherit;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
.ant-modal-title {
|
||||
font-family: $font-family-medium;
|
||||
color: #211f24;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
.ant-modal-body {
|
||||
padding: 24px 20px;
|
||||
}
|
||||
.ant-modal-footer {
|
||||
margin-top: 0;
|
||||
display: flex;
|
||||
height: 64px;
|
||||
padding: 0px 20px;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
border-top: 1px solid var(--Border-1, #d7d7d9);
|
||||
.ant-btn {
|
||||
&:not(:nth-child(1)) {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
37
src/styles/components/ant-radio.scss
Normal file
37
src/styles/components/ant-radio.scss
Normal file
@ -0,0 +1,37 @@
|
||||
.ant-radio-group {
|
||||
}
|
||||
.ant-radio-wrapper {
|
||||
margin-right: 24px;
|
||||
.ant-radio {
|
||||
.ant-radio-inner {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background-color: #fff;
|
||||
border: 2px solid var(--Border-1, #d7d7d9);
|
||||
&::after {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
&.ant-radio-checked {
|
||||
.ant-radio-inner {
|
||||
border: 4px solid var(--Brand-6, #6d4cfe);
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
&.ant-radio-disabled {
|
||||
.ant-radio-inner {
|
||||
border: 2px solid var(--Border-1, #d7d7d9);
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
}
|
||||
&.ant-radio-checked.ant-radio-disabled {
|
||||
.ant-radio-inner {
|
||||
border: 4px solid var(--Brand-6, #a794fe);
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
span.ant-radio + * {
|
||||
padding: 0 0 0 8px;
|
||||
}
|
||||
}
|
||||
72
src/styles/components/ant-table.scss
Normal file
72
src/styles/components/ant-table.scss
Normal file
@ -0,0 +1,72 @@
|
||||
.ant-table-wrapper {
|
||||
.ant-table {
|
||||
border-radius: 0;
|
||||
font-family: $font-family-regular;
|
||||
@mixin table-cell-text {
|
||||
color: var(--Text-1, #211f24);
|
||||
font-family: $font-family-regular;
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 22px;
|
||||
}
|
||||
.ant-table-container {
|
||||
border: none !important;
|
||||
height: 100%;
|
||||
.ant-table-content {
|
||||
.ant-table-thead {
|
||||
> tr {
|
||||
.ant-table-cell {
|
||||
padding: 13px 16px;
|
||||
background: var(--BG-100, #f7f8fa);
|
||||
border-start-start-radius: 0 !important;
|
||||
border-start-end-radius: 0 !important;
|
||||
@include table-cell-text;
|
||||
font-family: 'PingFangSC-Medium';
|
||||
.ant-table-column-sorters {
|
||||
justify-content: normal;
|
||||
.ant-table-column-title {
|
||||
flex: none;
|
||||
}
|
||||
.ant-table-column-sorter {
|
||||
margin-left: 8px;
|
||||
color: #939499;
|
||||
line-height: normal;
|
||||
.anticon.active {
|
||||
color: $color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-table-tbody {
|
||||
.ant-table-row {
|
||||
.ant-table-cell {
|
||||
padding: 11px 16px;
|
||||
@include table-cell-text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-table-bordered {
|
||||
.ant-table-container {
|
||||
.ant-table-thead {
|
||||
.ant-table-cell {
|
||||
border-inline-end: none !important ;
|
||||
border-bottom: 1px solid var(--Border-1, #d7d7d9);
|
||||
}
|
||||
}
|
||||
.ant-table-tbody {
|
||||
.ant-table-row {
|
||||
.ant-table-cell {
|
||||
border-inline-end: none !important;
|
||||
border-bottom: 1px solid var(--Border-1, #e6e6e8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -10,4 +10,10 @@
|
||||
@import "./button.scss";
|
||||
@import "./steps.scss";
|
||||
@import "./form.scss";
|
||||
@import "./chat-sender.scss";
|
||||
@import "./chat-sender.scss";
|
||||
|
||||
@import "./ant-modal.scss";
|
||||
@import "./ant-radio.scss";
|
||||
@import "./ant-form.scss";
|
||||
@import "./ant-button.scss";
|
||||
@import "./ant-table.scss";
|
||||
|
||||
Reference in New Issue
Block a user