1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-09-01 18:13:32 +02:00

Merge pull request #171 from soph-iest/dialog

Adds support for HTML dialog object
This commit is contained in:
Trezy
2018-12-13 14:52:34 -06:00
committed by GitHub
2 changed files with 31 additions and 0 deletions

16
docs/dialogs.stories.js Normal file
View File

@@ -0,0 +1,16 @@
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies
import { // eslint-disable-line import/no-extraneous-dependencies
withKnobs, boolean,
} from '@storybook/addon-knobs';
const stories = storiesOf('Dialogs', module);
stories.addDecorator(withKnobs);
stories.add('dialog', () => {
const open = boolean('open', true) ? 'open' : '';
return `<dialog ${open}>
<p class="title">Dialog</p>
<p>Alert: this is a dialog.</p>
</div>`;
});

View File

@@ -0,0 +1,15 @@
.nes-dialog {
padding: 1.5rem 2rem;
color: $base-color;
border: none;
box-shadow: 4px 0, -4px 0, 0 4px, 0 -4px;
> .backdrop,
&::backdrop {
background-color: rgba(0, 0, 0, 0.3);
}
> :last-child {
margin-bottom: 0;
}
}