mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-08-18 20:11:26 +02:00
Merge branch 'develop' into change-is-center-container-class
This commit is contained in:
16
docs/dialogs.stories.js
Normal file
16
docs/dialogs.stories.js
Normal 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>`;
|
||||||
|
});
|
@@ -5,8 +5,8 @@ $font-size: 16px !default;
|
|||||||
$base-color: $color-black;
|
$base-color: $color-black;
|
||||||
$background-color: $color-white;
|
$background-color: $color-white;
|
||||||
|
|
||||||
$cursor-url: url(../assets/cursor.png);
|
$cursor-url: url(https://unpkg.com/nes.css/assets/cursor.png);
|
||||||
$cursor-click-url: url(../assets/cursor-click.png);
|
$cursor-click-url: url(https://unpkg.com/nes.css/assets/cursor-click.png);
|
||||||
|
|
||||||
$default-colors: (
|
$default-colors: (
|
||||||
normal: $background-color,
|
normal: $background-color,
|
||||||
|
15
scss/elements/dialogs.scss
Normal file
15
scss/elements/dialogs.scss
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user