Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for HTML dialog object #171

Merged
merged 14 commits into from
Dec 13, 2018
16 changes: 16 additions & 0 deletions docs/dialogs.stories.js
Original file line number Diff line number Diff line change
@@ -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>`;
});
15 changes: 15 additions & 0 deletions scss/elements/dialogs.scss
Original file line number Diff line number Diff line change
@@ -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;
}
amity marked this conversation as resolved.
Show resolved Hide resolved
}