Skip to content

Commit

Permalink
feat(atoms): added new components in the atom category
Browse files Browse the repository at this point in the history
  • Loading branch information
leonlai257 committed Jan 18, 2024
1 parent 1098193 commit ad806d1
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/atoms/card.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { styled } from '../styles';

export const Card = styled('div', {
display: 'flex',
w: '100%',
bg: 'white',
rounded: '20px',
justify: 'center',
boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.25)',
});
4 changes: 4 additions & 0 deletions src/atoms/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export * from './button';
export * from './card';
export * from './input';
export * from './overlay';
export * from './text';
20 changes: 20 additions & 0 deletions src/atoms/input.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { styled } from '../styles';

export const InputField = styled('input', {
boxShadow: 'none',
borderStyle: 'none',
border: '1px solid',
textColor: '#666666',
background: 'white',
p: ['12px 16px'],
h: '100%',
w: '100%',
text: ['16px'],
rounded: '10px',
'&::placeholder': {
textColor: '#666666',
},
'&:hover': {
outline: 'none',
},
});
24 changes: 24 additions & 0 deletions src/atoms/overlay.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { styled } from '../styles';

export const Overlay = styled('div', {
position: 'fixed',
top: '0',
left: '0',
width: '100dvw',
height: '100dvh',
display: 'flex',
justify: 'center',
items: 'center',
backdropFilter: 'blur(3px)',
zIndex: 999,
color: 'white',
});

export const OverlayInteract = styled('div', {
position: 'absolute',
top: '0',
left: '0',
width: '100%',
height: '100%',
zIndex: -1,
});
46 changes: 46 additions & 0 deletions src/atoms/text.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { styled } from '../styles';

export const Text = styled('div', {
my: 'auto',
textAlign: 'center',
fontFamily: '$primary',
whiteSpace: 'nowrap',

variants: {
responsive: {
welcome: {
text: ['24px', '24px', '40px', '64px'],
fontWeight: 700,
},
title: {
text: ['16px', '20px', '24px'],
fontWeight: 700,
},
description: {
text: ['12px', '12px', '14px', '18px'],
},
},
style: {
warning: {
text: ['14px'],
fontWeight: 400,
color: '#FF9800',
},
info: {
text: ['14px'],
fontWeight: 400,
color: '#2196F3',
},
danger: {
text: ['14px'],
fontWeight: 400,
color: '#F44336',
},
success: {
text: ['14px'],
fontWeight: 400,
color: '#04AA6D',
},
},
},
});
2 changes: 0 additions & 2 deletions src/styles/stitches.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import {
zIndices,
} from './tokens';

export const NAVBAR_HEIGHT = '130px';
export const NAVBAR_MOBILE_HEIGHT = '89px';
export const {
config,
createTheme,
Expand Down

0 comments on commit ad806d1

Please sign in to comment.