owlprotocol / web3-redux

Web3 Redux Library
6 stars 1 forks source link

`AddressInputTextBox` #133

Closed leovigna closed 2 years ago

leovigna commented 2 years ago

Description

An input text box meant to bulk input/edit addresses. Similar behavior to an email "sender" input field as in Gmail. The field can be used for various use cases to edit a list of addresses. Users can input a comma or line separated list of Ethereum addresses. Valid addresses are parsed out and wrapped in a "pill" shaped component.

For maximum flexibility, we do NOT use Redux, but rather a more lightweight React Context, to store the input text box's data. Developers are than given the flexibility to read the text box input data using the useContext hook.

Features

Links

https://reactjs.org/docs/context.html https://www.reactjstutorials.com/react-context/6/react-use-context

leovigna commented 2 years ago

This component could potentially be abstracted as a generic solution that splits input by common separators ("," " ", "\n"), extracting "words". Then the following props could enable composition into the AddressInput

netanelben commented 2 years ago

/cib

github-actions[bot] commented 2 years ago

Branch issue-133 created! Clone with: git fetch && git checkout --track origin/issue-133 Rebase develop branch changes with: git checkout issue-133 && git rebase develop