-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ActionInfo component #642
base: main
Are you sure you want to change the base?
Conversation
OnlyJousting
commented
Jan 27, 2025
•
edited
Loading
edited
- Added ActionInfo component
- Need to integrate into theme/storybook
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
||
const { Spacing } = SizesAndSpaces | ||
|
||
type ComponentSize = 'S' | 'M' | 'L' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type ComponentSize = 'S' | 'M' | 'L' | |
type ComponentSize = 'small' | 'medium' | 'large' |
{shortenTokenAddress(address)} | ||
</Typography> | ||
<IconButton size="small" onClick={copyValue} sx={{ svg: { color: Button.Primary.Default.Fill } }}> | ||
<Icon name="Copy" size={24} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out SizesAndSpaces.IconSize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it returns values in 'rem' and the Icon component requires number
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preliminary review, eagerly awaiting a storybook entry
size?: ComponentSize | ||
} | ||
|
||
const labelSize: Record<ComponentSize, 'bodyXsRegular' | 'bodyMRegular'> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just use TypographyVariantKey
in the future if you ever want to keep your options open, but this works regardless.
import Link from '@mui/material/Link' | ||
import { Duration } from '../../themes/design/0_primitives' | ||
import { shortenTokenAddress } from 'ui/src/utils/' | ||
import { t } from 'i18next' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait what's this, aren't we using import { t } from '@lingui/macro'
?
import Icon from 'ui/src/Icon' | ||
import Typography from '@mui/material/Typography' | ||
import Link from '@mui/material/Link' | ||
import { Duration } from '../../themes/design/0_primitives' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can use @ui-kit
if you want to instead of relative files.
import Typography from '@mui/material/Typography' | ||
import Link from '@mui/material/Link' | ||
import { Duration } from '../../themes/design/0_primitives' | ||
import { shortenTokenAddress } from 'ui/src/utils/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh shit didn't know this existed, now we have a somewhat duplicate implementation with curve-ui-kit\src\utils\address.ts
. Should probably consolidate that some time.