-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update icon pack * Update address input styles * Use link button instead of link decorator * Add router decorator to savings withdraw story
- Loading branch information
Showing
12 changed files
with
200 additions
and
241 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
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
17 changes: 9 additions & 8 deletions
17
...ages/app/src/features/dialogs/savings/withdraw/components/form/ControlledAddressInput.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,20 +1,21 @@ | ||
import { Controller, UseFormReturn } from 'react-hook-form' | ||
import { UseFormReturn, useController } from 'react-hook-form' | ||
import { ReceiverFormSchema } from '../../types' | ||
import { AddressInput } from './AddressInput' | ||
|
||
interface ControlledAddressInputProps { | ||
label?: string | ||
form: UseFormReturn<ReceiverFormSchema> | ||
blockExplorerUrl: string | undefined | ||
} | ||
|
||
export function ControlledAddressInput({ form, blockExplorerUrl }: ControlledAddressInputProps) { | ||
export function ControlledAddressInput({ label, form, blockExplorerUrl }: ControlledAddressInputProps) { | ||
const { field } = useController({ control: form.control, name: 'receiver' }) | ||
return ( | ||
<Controller | ||
control={form.control} | ||
name="receiver" | ||
render={({ field }) => ( | ||
<AddressInput {...field} error={form.formState.errors.receiver?.message} blockExplorerUrl={blockExplorerUrl} /> | ||
)} | ||
<AddressInput | ||
{...field} | ||
label={label} | ||
error={form.formState.errors.receiver?.message} | ||
blockExplorerUrl={blockExplorerUrl} | ||
/> | ||
) | ||
} |
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
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
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
27 changes: 0 additions & 27 deletions
27
packages/app/src/ui/molecules/action-button/ActionButton.stories.tsx
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
packages/app/src/ui/molecules/action-button/ActionButton.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.