refactor(confirm): switch to new color system

This commit is contained in:
07akioni 2020-02-19 15:36:53 +08:00
parent e3548749b4
commit 271f37e37a
4 changed files with 36 additions and 26 deletions

View File

@ -28,7 +28,7 @@
</span>
<n-icon
v-if="closable"
class="n-confirm-title__close-mark"
class="n-confirm-title__close"
type="md-close"
size="22"
style="cursor:pointer;"

View File

@ -43,29 +43,29 @@
}
@include b(confirm-title-icon) {
@include m(warning-type) {
path {
fill: $--warning-6;
}
fill: map-get($--confirm-icon-color, 'warning');
stroke: map-get($--confirm-icon-color, 'warning');
}
@include m(success-type) {
path {
fill: $--success-6;
}
fill: map-get($--confirm-icon-color, 'success');
stroke: map-get($--confirm-icon-color, 'success');
}
@include m(error-type) {
path {
fill: $--error-6;
}
fill: map-get($--confirm-icon-color, 'error');
stroke: map-get($--confirm-icon-color, 'error');
}
@include m(info-type) {
fill: map-get($--confirm-icon-color, 'info');
stroke: map-get($--confirm-icon-color, 'info');
}
}
@include e(close-mark) {
path {
fill: $--confirm-close-fill;
}
@include e(close) {
fill: $--confirm-close-color;
stroke: $--confirm-close-color;
}
color: $--confirm-title-color;
color: $--confirm-title-text-color;
}
background: $--confirm-background-color;
color: $--confirm-color;
color: $--confirm-text-color;
}
}

View File

@ -1,7 +1,12 @@
@mixin setup-dark-confirm {
$--confirm-title-color: $--n-primary-text-color !global;
$--confirm-color: $--n-secondary-text-color !global;
$--confirm-background-color: $--n-dialog-color !global;
$--confirm-border-color: $--n-divider-color !global;
$--confirm-close-fill: $--n-close-color !global;
$--confirm-title-text-color: $--n-primary-text-color !global;
$--confirm-text-color: $--n-secondary-text-color !global;
$--confirm-background-color: $--n-modal-color !global;
$--confirm-close-color: $--n-close-color !global;
$--confirm-icon-color: (
'info': $--n-info-color,
'success': $--n-success-color,
'warning': $--n-warning-color,
'error': $--n-error-color
) !global;
}

View File

@ -1,7 +1,12 @@
@mixin setup-light-confirm {
$--confirm-title-color: $--n-primary-text-color !global;
$--confirm-color: $--n-secondary-text-color !global;
$--confirm-background-color: white !global;
$--confirm-border-color: white !global;
$--confirm-close-fill: $--n-close-color !global;
$--confirm-title-text-color: $--n-primary-text-color !global;
$--confirm-text-color: $--n-secondary-text-color !global;
$--confirm-background-color: $--n-modal-color !global;
$--confirm-close-color: $--n-close-color !global;
$--confirm-icon-color: (
'info': $--n-info-color,
'success': $--n-success-color,
'warning': $--n-warning-color,
'error': $--n-error-color
) !global;
}