Skip to content

Commit

Permalink
feat: adding flex box
Browse files Browse the repository at this point in the history
  • Loading branch information
HinsonSIDAN committed Feb 14, 2024
1 parent f87504b commit d9f3670
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/atoms/box.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export const Box = (styled: any) =>
styled('div', {
display: 'flex',
width: '100%',
wordWrap: 'break-word',
items: 'center',
});

export const HBox = (styled: any) =>
styled(Box, {
variants: {
direction: {
rowReverse: {
flexDirection: 'row-reverse',
},
},
},
});

export const VBox = (styled: any) =>
styled(Box, {
flexDirection: 'column',
variants: {
direction: {
columnReverse: {
flexDirection: 'column-reverse',
},
},
},
});

export const FormBox = (styled: any) =>
styled('form', {
display: 'flex',
w: '100%',
wordWrap: 'break-word',
items: 'center',
flexDirection: 'column',
});
2 changes: 2 additions & 0 deletions src/atoms/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Box } from './box';
import { Button } from './button';
import { Card } from './card';
import { Input } from './input';
import { Overlay, OverlayInteract } from './overlay';
import { Text } from './text';

export const sidanAtoms = (styled: any) => ({
Box: Box(styled),
Card: Card(styled),
Button: Button(styled),
Input: Input(styled),
Expand Down

0 comments on commit d9f3670

Please sign in to comment.