Skip to content

Commit

Permalink
fix card & avatar circular dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikaoto committed Aug 31, 2023
1 parent 742e88a commit 4273b65
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 49 deletions.
37 changes: 36 additions & 1 deletion uikit/domql/Avatar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Img, Flex } from '@symbo.ls/atoms'
import { Button } from '@symbo.ls/button'
import { IndicatorDot } from '@symbo.ls/accessories'
import { InfoSet } from '@symbo.ls/infoset'
import { CardLabel } from '@symbo.ls/card'
import { CardLabel } from '@symbo.ls/label'

export const Avatar = {
extend: Img,
Expand All @@ -20,6 +20,41 @@ export const Avatar = {
}
}

export const DropDownWithAvatar = {
extend: Flex,
avatar: { extend: Avatar },
list: {
childExtend: { tag: 'H6' },
...[{ props: { text: 'eth' } }]
},
downArrow: {
extend: Button,
props: { icon: 'arrowDown' }
},

props: {
boxSize: 'fit-content fit-content',
align: 'center flex-start',
padding: 'Y Z',
gap: 'Z',
round: 'Z',
background: 'rgba(28, 28, 31, 1)',
avatar: { boxSize: 'A+Y' },
list: {
childProps: {
fontSize: 'Z',
textTransform: 'uppercase'
}
},
downArrow: {
padding: '0',
background: 'transparent',
color: 'white',
fontSize: 'Y'
}
}
}

export const AvatarWithIndicator = {
avatar: { extend: Avatar },
indicator: { extend: IndicatorDot },
Expand Down
50 changes: 3 additions & 47 deletions uikit/domql/Card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,9 @@ import { Flex } from '@symbo.ls/atoms'
import { Button } from '@symbo.ls/button'
import { InfoSet } from '@symbo.ls/infoset'
import { Icon } from '@symbo.ls/icon'
import { Avatar } from '@symbo.ls/avatar'
import { Avatar, DropDownWithAvatar } from '@symbo.ls/avatar'
import { BalancesIndicator } from '@symbo.ls/accessories'

export const CardLabel = {
props: {
text: '-2.902x',
fontSize: 'Y',
background: '#F4454E',
boxSize: 'fit-content fit-content',
padding: 'W Y',
round: 'Y'
}
}

export const DropDownWithAvatar = {
extend: Flex,
avatar: { extend: Avatar },
list: {
childExtend: { tag: 'H6' },
...[{ props: { text: 'eth' } }]
},
downArrow: {
extend: Button,
props: { icon: 'arrowDown' }
},

props: {
boxSize: 'fit-content fit-content',
align: 'center flex-start',
padding: 'Y Z',
gap: 'Z',
round: 'Z',
background: 'rgba(28, 28, 31, 1)',
avatar: { boxSize: 'A+Y' },
list: {
childProps: {
fontSize: 'Z',
textTransform: 'uppercase'
}
},
downArrow: {
padding: '0',
background: 'transparent',
color: 'white',
fontSize: 'Y'
}
}
}
import { CardLabel } from '@symbo.ls/label'

export const AmountWithLabel = {
extend: Flex,
Expand All @@ -69,6 +24,7 @@ export const AmountWithLabel = {
}
}
}

export const Card = {
extend: InfoSet,

Expand Down
11 changes: 11 additions & 0 deletions uikit/domql/Label/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,14 @@ export const Label = {
props: ({ parent }) => ({ text: parent.props.emoji })
}
}

export const CardLabel = {
props: {
text: '-2.902x',
fontSize: 'Y',
background: '#F4454E',
boxSize: 'fit-content fit-content',
padding: 'W Y',
round: 'Y'
}
}
2 changes: 1 addition & 1 deletion uikit/domql/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

export * from '@symbo.ls/atoms'
export * from '@symbo.ls/box'
export * from '@symbo.ls/infoset'
export * from '@symbo.ls/avatar'
export * from '@symbo.ls/button'
export * from '@symbo.ls/dialog'
Expand Down Expand Up @@ -31,7 +32,6 @@ export * from '@symbo.ls/steps'
export * from '@symbo.ls/table'
export * from '@symbo.ls/chat'
export * from '@symbo.ls/card'
export * from '@symbo.ls/infoset'
export * from '@symbo.ls/accessories'
export * from '@symbo.ls/icontextwithnotification'
export * from '@symbo.ls/textcomponents'
Expand Down

0 comments on commit 4273b65

Please sign in to comment.