Skip to content
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

[Crypto Address] - new components #1105

Open
BillyG83 opened this issue May 25, 2023 · 1 comment
Open

[Crypto Address] - new components #1105

BillyG83 opened this issue May 25, 2023 · 1 comment
Assignees

Comments

@BillyG83
Copy link
Contributor

Screenshot 2023-05-25 at 09 51 20

please build this new component 👍

Interface

  • address: string
  • color?: string
  • textSize?: 'body16' | 'body18' | 'caption14' | 'caption12' | 'caption10'
  • textWeight?: TStandardWeight
  • linkUrl?: string;

Result

  • address is shortened
  • color has default, but will color the icons and text if passed
  • textSize has default, but will change the text size if passed (use Typography)
  • textWeight has default, but will change the text wight if passed (use Typography)
  • linkUrl if passed will show the link icon which links to the url plus the address (example below)
  • click copy will copy address (use Copy component)

linkUrl example

https://www.dextools.io/app/en/ether/pair-explorer/0x6c4c7f46d9d4ef6bc5c9e155f011ad19fc4ef321

@Emkay2309
Copy link

I can try to create this component using ts

type TextSize = 'body16' | 'body18' | 'caption14' | 'caption12' | 'caption10';
type TextWeight = 'regular' | 'medium' | 'bold'; // Adjust according to your Typography component

interface AddressDisplayProps {
address: string;
color?: string;
textSize?: TextSize;
textWeight?: TextWeight;
linkUrl?: string;
}

use this interface for the type in the AddressDisplay component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants