Skip to content

Commit

Permalink
feat #178 - Comps related to filter (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-dassana authored Jan 14, 2021
1 parent 89384c8 commit 31afbf2
Show file tree
Hide file tree
Showing 44 changed files with 2,564 additions and 820 deletions.
10 changes: 9 additions & 1 deletion .storybook/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,18 @@ html,
body,
#root,
.App {
font-family: 'Inter', sans-serif;
height: 100%;
}

@supports (font-variation-settings: normal) {
html,
body,
#root,
.App {
font-family: 'Inter var', sans-serif;
}
}

/* Storybook styles */

.sb-show-main {
Expand Down
35 changes: 35 additions & 0 deletions .storybook/utils.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { createUseStyles } from 'react-jss'
import React from 'react'
import { Story } from '@storybook/react/types-6-0'
import { styleguide, themes, ThemeType } from '../src/components/assets/styles'

const { spacing } = styleguide

const { dark, light } = ThemeType

const useStyles = createUseStyles({
decorator: {
background: themes[light].background.secondary,
height: `calc(100vh - ${spacing.m * 2}px)`,
padding: spacing.l,
width: '100%'
},
// eslint-disable-next-line sort-keys
'@global': {
[`.${dark}`]: {
'& $decorator': {
background: themes[dark].background.secondary
}
}
}
})

export const SecondaryBgDecorator = (CompStory: Story) => {
const classes = useStyles()

return (
<div className={classes.decorator}>
<CompStory />
</div>
)
}
Loading

0 comments on commit 31afbf2

Please sign in to comment.