Skip to content

Commit

Permalink
feat(dialog): adding dark modifier to dialogs #241
Browse files Browse the repository at this point in the history
  • Loading branch information
youngkaneda committed Jan 17, 2019
1 parent b58e8b0 commit e74d2c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/dialogs.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ stories.addDecorator(withKnobs);
stories.add('dialog', () => {
const open = boolean('open', true) ? 'open' : '';
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}>
<p class="title">Dialog</p>
Expand Down
9 changes: 9 additions & 0 deletions scss/elements/dialogs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@

&.is-rounded {
@include rounded-corners();

&.is-dark {
@include rounded-corners(true);
}
}
&.is-dark {
color: $background-color;
background-color: $base-color;
border-color: $background-color;
}
}

0 comments on commit e74d2c0

Please sign in to comment.