Signed-off-by: Avior <github@avior.me>
This commit is contained in:
2021-10-06 17:57:59 +02:00
parent bb001148a5
commit 8d7a8c70f0
73 changed files with 1508 additions and 6817 deletions

View File

@@ -0,0 +1,9 @@
.container
padding 0 32px
width 100%
max-width 1280px + @padding[1] * 2
margin auto auto
> *:not(:first-child)
margin-top 48px
&.main
margin 48px auto

View File

@@ -0,0 +1,19 @@
import { Meta } from '@storybook/react/types-6-0'
import React from 'react'
import Component from '.'
import Text from '../Text'
export default {
title: 'DZEIO/Container',
component: Component,
argTypes: {
title: { control: 'text'}
},
parameters: {
layout: 'fullscreen'
}
} as Meta
export const Basic = (args: any) => (
<Component {...args}><Text>Test</Text></Component>
)

16
src/Container/index.tsx Normal file
View File

@@ -0,0 +1,16 @@
import React from 'react'
import { buildClassName } from '../Util'
import css from './Container.module.styl'
interface Props {
children: React.ReactNode
className?: string
mainContainer?: boolean
}
export default class Container extends React.Component<Props> {
public render = () => React.createElement(this.props.mainContainer ? 'main' : 'div', {className: buildClassName(css.container, this.props.className, [css.main, this.props.mainContainer]), children: this.props.children})
}