1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-23 14:22:52 +02:00

fix(dialog): Fix dialog corners

The dialog styles added by @sophi-est weren't being loaded into the compiled stylesheet. I've added
them to the elements index file and moved the rounded corners styles into and `.is-rounded` modifier
class.
This commit is contained in:
Trezy
2018-12-18 13:05:32 -06:00
parent 218b3bf09c
commit 6258cd9738
3 changed files with 18 additions and 12 deletions

View File

@@ -8,8 +8,10 @@ stories.addDecorator(withKnobs);
stories.add('dialog', () => {
const open = boolean('open', true) ? 'open' : '';
const isRounded = boolean('is-rounded', false) ? 'is-rounded' : '';
const selectedClasses = [isRounded];
return `<dialog ${open}>
return `<dialog class="nes-dialog ${selectedClasses.join(' ')}" ${open}>
<p class="title">Dialog</p>
<p>Alert: this is a dialog.</p>
</div>`;

View File

@@ -1,11 +1,12 @@
@charset "utf-8";
@import "buttons.scss";
@import "containers.scss";
@import "radios.scss";
@import "checkboxes.scss";
@import "lists.scss";
@import "balloons.scss";
@import "tables.scss";
@import "progress.scss";
@import "avatar.scss";
@import "balloons.scss";
@import "buttons.scss";
@import "checkboxes.scss";
@import "containers.scss";
@import "dialogs.scss";
@import "lists.scss";
@import "progress.scss";
@import "radios.scss";
@import "tables.scss";

View File

@@ -1,8 +1,5 @@
.nes-dialog {
padding: 1.5rem 2rem;
color: $base-color;
border: none;
box-shadow: 4px 0, -4px 0, 0 4px, 0 -4px;
> .backdrop,
&::backdrop {
@@ -12,4 +9,10 @@
> :last-child {
margin-bottom: 0;
}
&.is-rounded {
color: $base-color;
border: none;
box-shadow: 4px 0, -4px 0, 0 4px, 0 -4px;
}
}