-
Notifications
You must be signed in to change notification settings - Fork 1
refactor(react-ui): ArrowCardPair #306
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@zerodev/react-ui": patch | ||
| --- | ||
|
|
||
| feat: promote `ArrowCardPair` (and `ArrowView`) to `@zerodev/react-ui`. Previously local to wallet-react-ui's signing pages; now a shared primitive available to other consumers (e.g. smart-routing-address-react-ui's Deposit flow). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import type { Meta, StoryObj } from '@storybook/react-vite' | ||
|
|
||
| import { Text } from '../Text' | ||
| import { Wrapper } from '../Wrapper' | ||
| import { ArrowCardPair } from '.' | ||
|
|
||
| const meta: Meta<typeof ArrowCardPair> = { | ||
| title: 'Layout/ArrowCardPair', | ||
| component: ArrowCardPair, | ||
| parameters: { | ||
| layout: 'centered', | ||
| }, | ||
| tags: ['autodocs'], | ||
| decorators: [ | ||
| (Story) => ( | ||
| <div style={{ width: 360 }}> | ||
| <Story /> | ||
| </div> | ||
| ), | ||
| ], | ||
| } | ||
|
|
||
| export default meta | ||
| type Story = StoryObj<typeof meta> | ||
|
|
||
| /** | ||
| * Two cards with a chevron-down arrow floating between them, and rounded | ||
| * notches clipped out of each card where the arrow sits. Used to visually | ||
| * connect a "from" and "to" side of a swap, transfer, or deposit flow. | ||
| */ | ||
| export const Default: Story = { | ||
| args: { | ||
| topCard: ( | ||
| <Wrapper variant="ghost" className="zd:rounded-2xl zd:p-4"> | ||
| <Text className="zd:text-h3">Top card</Text> | ||
| </Wrapper> | ||
| ), | ||
| bottomCard: ( | ||
| <Wrapper variant="ghost" className="zd:rounded-2xl zd:p-4"> | ||
| <Text className="zd:text-h3">Bottom card</Text> | ||
| </Wrapper> | ||
| ), | ||
| }, | ||
| } |
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Here's the full reference on how to do it. One note: we don't need to merge #316 - we can just keep on developing until we have a decent stack of changes or need an urgent release. |
This file was deleted.
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.
I never really liked the
ArrowCardPairname, feels very verbose. How aboutArrowStackorCardPair?Uh oh!
There was an error while loading. Please reload this page.
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.
Honestly I prefer
ArrowCardPairover the other 2, but I can consider renaming it to something else. I was thinking maybeCardPairWithArrowalthough that's even longer, but more understandable I think.Anyways I would prefer to rename it in a separate PR as that component touches several files that would cause many conflicts.
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.
Let's leave it as is then, it's more of a nit.