Skip to content

Commit

Permalink
Merge pull request #81 from spartez/dark-mode-support
Browse files Browse the repository at this point in the history
dark mode support
  • Loading branch information
abilicz committed Jan 5, 2023
2 parents c849f5b + cc99652 commit e0dcd6a
Show file tree
Hide file tree
Showing 135 changed files with 36,363 additions and 25,507 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env node */
module.exports = {
extends: ['@spartez/eslint-config-vue'],
extends: ['plugin:vue/recommended'],
rules: {
'max-len': [
'warn',
Expand Down
1 change: 1 addition & 0 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import 'storybook-addon-vue-info/lib/register'
import "storybook-addon-root-attribute/register";
37 changes: 37 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import '@atlaskit/css-reset/dist/bundle.css';
import '@atlaskit/tokens/css/atlassian-dark.css'
import '@atlaskit/tokens/css/atlassian-light.css'
import '@atlaskit/tokens/css/atlassian-spacing.css'
import '@atlaskit/tokens/css/atlassian-typography.css'
import './style.css';

import { storiesOf, configure } from '@storybook/vue';
import { withInfo } from 'storybook-addon-vue-info';
import { withRootAttribute } from "storybook-addon-root-attribute";

const req = require.context('../stories', true, /\.story\.vue$/);

Expand All @@ -21,6 +26,38 @@ const registerStory = (filename) => {

storiesOf(group, module)
.addDecorator(withInfo)
.addDecorator(withRootAttribute)
.addParameters({
rootAttributes: [{
root: 'html',
attribute: 'data-theme',
defaultState: {
name: "Light",
value: null
},
states: [
{
name: "dark",
value: "dark"
}
]
}]
}).addDecorator(withRootAttribute)
.addParameters({
rootAttribute: {
attribute: 'data-theme',
defaultState: {
name: "Light",
value: null
},
states: [
{
name: "Dark",
value: "dark"
}
]
}
})
.add(name, () => ({
name: 'StoryWrapper',
components: component.components,
Expand Down
Loading

0 comments on commit e0dcd6a

Please sign in to comment.