Skip to content

Commit

Permalink
Fixed storybook and added colours for dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sorina-ocheana committed Jan 18, 2024
1 parent d4ec3fe commit a600757
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../modus-toolbar.vars.scss';
@import '../modus-toolbar.vars';

div {
background-color: $modus-toolbar-divider-bg;
Expand All @@ -21,6 +21,7 @@ div {
button {
align-items: center;
background-color: $modus-toolbar-bg;
border: 0;
cursor: default;
display: inline-flex;
font-family: $primary-font;
Expand All @@ -29,7 +30,6 @@ button {
justify-content: center;
min-width: $rem-24px;
padding: 0 $rem-4px 0 $rem-4px;
border: 0;
position: relative;
user-select: none;
vertical-align: middle;
Expand Down Expand Up @@ -77,12 +77,12 @@ button {
}

div {
position: relative;
display: flex;
align-items: center;
justify-content: center;
background-color: $modus-toolbar-bg;
border-radius: $rem-2px;
display: flex;
justify-content: center;
position: relative;

&.style-margin {
height: $rem-24px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import './modus-toolbar.vars.scss';
@import './modus-toolbar.vars';

div {
align-items: center;
Expand All @@ -20,15 +20,15 @@ div {
box-shadow: $box-shadow-lg;

&.layout-horizontal {
padding: $rem-4px 0 $rem-4px 0;
border-left: $rem-4px solid $modus-toolbar-bg;
border-right: $rem-8px solid $modus-toolbar-bg;
padding: $rem-4px 0 $rem-4px 0;
}

&.layout-vertical {
padding: 0 $rem-4px 0 $rem-4px;
border-top: $rem-4px solid $modus-toolbar-bg;
border-bottom: $rem-8px solid $modus-toolbar-bg;
border-top: $rem-4px solid $modus-toolbar-bg;
padding: 0 $rem-4px 0 $rem-4px;
}
}

Expand Down
4 changes: 4 additions & 0 deletions stencil-workspace/src/global/themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,10 @@
--modus-toolbar-button-hover-bg: var(--modus-gray-0);
--modus-toolbar-button-active-bg: var(--modus-gray-1);
--modus-toolbar-divider-bg: var(--modus-gray-0);
--modus-toolbar-dark-bg: var(--modus-gray-10);
--modus-toolbar-button-dark-hover-bg: var(--modus-gray-4);
--modus-toolbar-button-dark-active-bg: var(--modus-gray-6);
--modus-toolbar-divider-dark-bg: var(--modus-gray-8);
}

// Mixins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A new TypeScript typing has been provided named Button defined as:
textButton?: string; // optional.
disabled?: boolean; // optional.
active?: boolean; // optional.
divader?: boolean; // optional.
divider?: boolean; // optional.
}
```

Expand Down Expand Up @@ -86,15 +86,15 @@ A new TypeScript typing has been provided named Button defined as:
tooltip:
{
text: 'Add',
position: 'bottom',
position: 'right',
},
iconSrc: 'add',
},
{
tooltip:
{
text: 'Edit',
position: 'bottom',
position: 'right',
},
iconSrc: 'edit',
disabled: true,
Expand All @@ -103,7 +103,7 @@ A new TypeScript typing has been provided named Button defined as:
tooltip:
{
text: 'Refresh',
position: 'bottom',
position: 'right',
},
iconSrc: 'refresh',
active: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
},
};

const Template = ({buttons, layout, toolbarStyle}) => html`<modus-toolbar buttons=${buttons} layout=${layout} toolbarStyle=${toolbarStyle}></modus-toolbar>`;
const Template = ({buttons, layout, toolbarStyle}) => html`<modus-toolbar .buttons=${buttons} .layout=${layout} .toolbarStyle=${toolbarStyle}></modus-toolbar>`;

export const Default = Template.bind({});
Default.args = {
Expand Down Expand Up @@ -84,23 +84,23 @@ Default.args = {
};

export const VerticalSplitToolbar = Template.bind({});
Default.args = {
VerticalSplitToolbar.args = {
buttons: [
{ tooltip: {
text: 'Add',
position: 'bottom',
position: 'right',
},
iconSrc: 'add',
},
{ tooltip: {
text: 'Edit',
position: 'bottom',
position: 'right',
},
iconSrc: 'edit', disabled: true,
},
{ tooltip: {
text: 'Refresh',
position: 'bottom',
position: 'right',
},
iconSrc: 'refresh', active: true,
}
Expand Down

0 comments on commit a600757

Please sign in to comment.