mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-29 00:40:18 +02:00
feat(dialog): adding dark modifier to dialogs #241
This commit is contained in:
@@ -9,7 +9,8 @@ stories.addDecorator(withKnobs);
|
|||||||
stories.add('dialog', () => {
|
stories.add('dialog', () => {
|
||||||
const open = boolean('open', true) ? 'open' : '';
|
const open = boolean('open', true) ? 'open' : '';
|
||||||
const isRounded = boolean('is-rounded', false) ? 'is-rounded' : '';
|
const isRounded = boolean('is-rounded', false) ? 'is-rounded' : '';
|
||||||
const selectedClasses = [isRounded];
|
const isDark = boolean('is-dark', false) ? 'is-dark' : '';
|
||||||
|
const selectedClasses = [isRounded, isDark];
|
||||||
|
|
||||||
return `<dialog class="nes-dialog ${selectedClasses.join(' ')}" ${open}>
|
return `<dialog class="nes-dialog ${selectedClasses.join(' ')}" ${open}>
|
||||||
<p class="title">Dialog</p>
|
<p class="title">Dialog</p>
|
||||||
|
@@ -12,5 +12,14 @@
|
|||||||
|
|
||||||
&.is-rounded {
|
&.is-rounded {
|
||||||
@include rounded-corners();
|
@include rounded-corners();
|
||||||
|
|
||||||
|
&.is-dark {
|
||||||
|
@include rounded-corners(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.is-dark {
|
||||||
|
color: $background-color;
|
||||||
|
background-color: $base-color;
|
||||||
|
border-color: $background-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user