mirror of
https://github.com/gotson/komga.git
synced 2025-12-06 08:32:25 +01:00
storybook: add viewports
This commit is contained in:
parent
50dc9d143b
commit
359d5504cb
2 changed files with 42 additions and 1 deletions
|
|
@ -12,6 +12,8 @@ import { vueIntl } from '@/plugins/vue-intl'
|
|||
import 'virtual:uno.css'
|
||||
import { availableLocales } from '@/utils/i18n/locale-helper'
|
||||
import { localeDecorator } from './locale.decorator'
|
||||
import { INITIAL_VIEWPORTS } from 'storybook/viewport'
|
||||
import { viewports } from './viewport'
|
||||
|
||||
initialize(
|
||||
{
|
||||
|
|
@ -36,7 +38,9 @@ const preview: Preview = {
|
|||
date: /Date$/i,
|
||||
},
|
||||
},
|
||||
|
||||
viewport: {
|
||||
options: [...viewports],
|
||||
},
|
||||
a11y: {
|
||||
// 'todo' - show a11y violations in the test UI only
|
||||
// 'error' - fail CI on a11y violations
|
||||
|
|
|
|||
37
next-ui/.storybook/viewport.ts
Normal file
37
next-ui/.storybook/viewport.ts
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
export const viewports = [
|
||||
{
|
||||
name: 'xs',
|
||||
styles: {
|
||||
width: '400px',
|
||||
height: '963px',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'sm',
|
||||
styles: {
|
||||
width: '950px',
|
||||
height: '963px',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'md',
|
||||
styles: {
|
||||
width: '1200px',
|
||||
height: '963px',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'lg',
|
||||
styles: {
|
||||
width: '1900px',
|
||||
height: '963px',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'xl',
|
||||
styles: {
|
||||
width: '2550px',
|
||||
height: '963px',
|
||||
},
|
||||
},
|
||||
]
|
||||
Loading…
Reference in a new issue