Skip to content

Extract shared MoneyInputLayout for input pages#904

Closed
gudnuf wants to merge 4 commits intomasterfrom
input-refactoring
Closed

Extract shared MoneyInputLayout for input pages#904
gudnuf wants to merge 4 commits intomasterfrom
input-refactoring

Conversation

@gudnuf
Copy link
Contributor

@gudnuf gudnuf commented Mar 3, 2026

I wanted to do this because when thinking about how to build transfers and buying bitcoin it made the most sense to make individual buy-input, recieve-input, and transfer-input rather than trying to coordinate it all in one component. Those PRs will build on this one.

There's 4 commits to the refactor

gudnuf added 4 commits March 2, 2026 19:58
Pull the duplicated MoneyInputDisplay + ConvertedMoneySwitcher out of
send-input and receive-input into features/shared/money-input-display.
The new component composes the raw amount display with the currency
switcher and takes the same props both consumers were already threading
through.
The prop name now describes intent (fires on invalid input) rather than
implementation (shake animation). Consumers still own the animation
choice via useAnimation — this just clarifies the contract.
Composes useMoneyInput + useAnimation into a single hook so consumers
don't wire them together manually. handleNumberInput is now single-arg
(shake fires internally on invalid input). Also exposes showDecimal and
inputErrorClassName so consumers don't derive them.
Consolidate useMoneyInputField, MoneyInputLayout, and the display
components into a single money-input-layout module. The hook and layout
are always used together so they live in one file. Display components
are now internal — consumers compose via the layout's slots (children,
actions, belowDisplay).

Send uses belowDisplay for its destination row between the amount
display and account selector.
@vercel
Copy link

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agicash Building Building Preview, Comment Mar 3, 2026 4:48am

Request Review

@supabase
Copy link

supabase bot commented Mar 3, 2026

This pull request has been ignored for the connected project hrebgkfhjpkbxpztqqke because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@gudnuf
Copy link
Contributor Author

gudnuf commented Mar 5, 2026

we decided to not do this and just rebuild each component

@gudnuf gudnuf closed this Mar 5, 2026
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

Successfully merging this pull request may close these issues.

1 participant