Skip to content

Commit

Permalink
applied figma styles, closes #854
Browse files Browse the repository at this point in the history
  • Loading branch information
gerouvi committed Nov 28, 2024
1 parent c252b71 commit 7de2550
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const colorsBase = {
},
gradient: 'linear-gradient(to right, #546E39, #2E441A)',
gray: {
light: '#CBD5E0',
light: 'rgba(255, 255, 255, 0.24)',
normal: '#718096',
},
primary: '#546E39',
Expand All @@ -24,6 +24,13 @@ export const colorsBase = {

export const colors = {
account_create_text_secondary: colorsBase.gray.normal,
alert: {
bg: {
light: colorsBase.white.pure,
dark: colorsBase.blue.grayish,
},
border: colorsBase.gray.light,
},
auth: {
textColorSecondary: colorsBase.gray.normal,
},
Expand Down
32 changes: 32 additions & 0 deletions src/theme/components/alert.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { alertAnatomy } from '@chakra-ui/anatomy'
import { createMultiStyleConfigHelpers } from '@chakra-ui/react'
import { InfoIcon, WarningIcon, CheckIcon, CloseIcon } from '@chakra-ui/icons'

const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(alertAnatomy.keys)

const baseStyle = definePartsStyle({
container: {
bgColor: 'alert.bg.light',
display: 'grid',
gridTemplateColumns: { base: '1fr', lg: 'fit-content(50px) 1fr' },
border: '1px solid',
borderColor: 'alert.border',
borderRadius: 'lg',
width: 'fit-content',

_dark: {
bgColor: 'alert.bg.dark',
},
},
title: {
gridColumn: { lg: 2 },
},
description: {
gridColumn: { lg: 2 },
},
icon: {
gridColumn: 1,
},
})

export const Alert = defineMultiStyleConfig({ baseStyle })
2 changes: 2 additions & 0 deletions src/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { Text } from './components/text'
import { Textarea } from './components/textarea'
import { editor } from './editor'
import { spacing } from './space'
import { Alert } from './components/alert'

export const theme = extendTheme(vtheme, {
config: {
Expand Down Expand Up @@ -79,6 +80,7 @@ export const theme = extendTheme(vtheme, {
},
components: {
Accordion,
Alert,
Badge,
Button,
Card,
Expand Down

0 comments on commit 7de2550

Please sign in to comment.