Skip to content
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

pair selector and style #130

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions src/app/components/PairSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,42 @@ export function PairSelector() {
dispatch(selectPairAddress(pairAddress));
};
return (
<div className="dropdown" id="pair-selector">
<label tabIndex={0} className="btn m-1">
{pairSelector.name}
<div
className="dropdown dropdown-start w-full not-prose"
nguvictor marked this conversation as resolved.
Show resolved Hide resolved
id="pair-selector"
>
<label
tabIndex={0}
className="justify-between btn btn-block m-1 font-bold"
>
<span>{pairSelector.name || "Loading"}</span>
<span className="float-right">
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
fill="white"
viewBox="0 0 16 16"
>
<path d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" />
</svg>
</span>
</label>
<ul
tabIndex={0}
className="dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-52"
className="dropdown-content z-[1] menu shadow bg-neutral rounded-box w-full mt-0 mb-0"
>
<li className="text-xs text-left uppercase text-secondary-content px-4">
Select a pair of tokens:
</li>
{pairSelector.pairsList.map((pair, index) => (
<li key={index}>
<button onClick={() => selectPair(pair.address)}>
<li className="font-bold" key={index}>
<button
className="justify-between"
onClick={() => selectPair(pair.address)}
>
{pair.name}
<span>+</span>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is there a + sign?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The figma had a + sign, I could of used a svg icon, but seemed overkill. I suspect this will be a favorite button in the future, but its a placeholder for now.

</button>
</li>
))}
Expand Down