-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
react: update
ConnectButton
to fall back to Blobbie
avatar
- Loading branch information
1 parent
2dc8431
commit dcc4bc5
Showing
6 changed files
with
862 additions
and
338 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@treasure-dev/tdk-react": patch | ||
--- | ||
|
||
Updated `ConnectButton` to fall back to `Blobbie` avatar |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { UserAvatar } from "./UserAvatar"; | ||
|
||
const meta: Meta<typeof UserAvatar> = { | ||
component: UserAvatar, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof UserAvatar>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
address: "0x73239D66c237D5923a7DF2D4E1E59fB7432c7826", | ||
className: "tdk-w-6 tdk-h-6 tdk-rounded-lg", | ||
}, | ||
}; | ||
|
||
export const WithPfp: Story = { | ||
args: { | ||
address: "0x73239D66c237D5923a7DF2D4E1E59fB7432c7826", | ||
pfp: "https://djmahssgw62sw.cloudfront.net/general/0xb8e0d594cd869e49ae55c5b44fa886857b1cdeb9d4aeb49b44d47eeccf97c835.png", | ||
className: "tdk-w-6 tdk-h-6 tdk-rounded-lg", | ||
}, | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Blobbie } from "thirdweb/react"; | ||
|
||
type Props = { | ||
address: string; | ||
pfp?: string | null; | ||
className?: string; | ||
}; | ||
|
||
export const UserAvatar = ({ address, pfp, className }: Props) => | ||
pfp ? ( | ||
<img src={pfp} alt="" className={className} /> | ||
) : ( | ||
<Blobbie address={address} className={className} /> | ||
); |
Oops, something went wrong.