-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
704 additions
and
673 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/components/Atoms/Address/Address.tsx → src/components/Atoms/Address/AddressView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 48 additions & 50 deletions
98
src/components/Atoms/AddressAvatar/AddressAvatar.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,63 @@ | ||
import { type Meta, type StoryObj } from "@storybook/react"; | ||
import { AddressAvatar } from "./AddressAvatar"; | ||
import { AddressAvatarView } from "./AddressAvatarView"; | ||
import { type AddressAvatarProps } from "@/utils/types/atoms.types"; | ||
import { GRK_SIZES } from "@/utils/constants/shared.constants"; | ||
|
||
const meta: Meta<typeof AddressAvatar> = { | ||
title: "Atoms/AddressAvatar", | ||
component: AddressAvatar, | ||
const meta: Meta<typeof AddressAvatarView> = { | ||
title: "Atoms/Address Avatar", | ||
component: AddressAvatarView, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof AddressAvatar>; | ||
type Story = StoryObj<typeof AddressAvatarView>; | ||
|
||
const render = ({ size, type, address, rounded }: AddressAvatarProps) => { | ||
return ( | ||
<> | ||
<div className="m-1"> | ||
<AddressAvatar | ||
address={address} | ||
size={size} | ||
type={type} | ||
rounded={rounded} | ||
/> | ||
</div> | ||
|
||
<div className="m-1 mt-20 flex gap-1"> | ||
<AddressAvatar | ||
address={address} | ||
size={GRK_SIZES.LARGE} | ||
type={"effigy"} | ||
/> | ||
<AddressAvatar | ||
address={address} | ||
size={GRK_SIZES.MEDIUM} | ||
type={"wallet"} | ||
/> | ||
<AddressAvatar | ||
address={address} | ||
size={GRK_SIZES.SMALL} | ||
type={"effigy"} | ||
/> | ||
<AddressAvatar | ||
address={address} | ||
size={GRK_SIZES.EXTRA_SMALL} | ||
type={"fingerprint"} | ||
/> | ||
<AddressAvatar | ||
address={address} | ||
size={GRK_SIZES.EXTRA_EXTRA_SMALL} | ||
type={"wallet"} | ||
/> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export const AvatarSizes: Story = { | ||
export const AddressAvatar: Story = { | ||
args: { | ||
size: GRK_SIZES.SMALL, | ||
type: "fingerprint", | ||
address: "0xd8da6bf26964af9d7eed9e03e53415d37aa96045", | ||
}, | ||
render: render, | ||
render: ({ size, type, address, rounded }: AddressAvatarProps) => { | ||
return ( | ||
<> | ||
<div className="m-1"> | ||
<AddressAvatarView | ||
address={address} | ||
size={size} | ||
type={type} | ||
rounded={rounded} | ||
/> | ||
</div> | ||
|
||
<div className="m-1 mt-20 flex gap-1"> | ||
<AddressAvatarView | ||
address={address} | ||
size={GRK_SIZES.LARGE} | ||
type={"effigy"} | ||
/> | ||
<AddressAvatarView | ||
address={address} | ||
size={GRK_SIZES.MEDIUM} | ||
type={"wallet"} | ||
/> | ||
<AddressAvatarView | ||
address={address} | ||
size={GRK_SIZES.SMALL} | ||
type={"effigy"} | ||
/> | ||
<AddressAvatarView | ||
address={address} | ||
size={GRK_SIZES.EXTRA_SMALL} | ||
type={"fingerprint"} | ||
/> | ||
<AddressAvatarView | ||
address={address} | ||
size={GRK_SIZES.EXTRA_EXTRA_SMALL} | ||
type={"wallet"} | ||
/> | ||
</div> | ||
</> | ||
); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.