-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move components to bleu/cow-hooks-ui
- Loading branch information
1 parent
d3f11cd
commit 4e4b853
Showing
8 changed files
with
96 additions
and
99 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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import clsx from "clsx"; | ||
|
||
const Label = ({ label }: { label: string }) => ( | ||
<div className="w-fit ml-2 my-2.5"> | ||
<label className="text-sm">{label}</label> | ||
</div> | ||
); | ||
|
||
export const AddressInput = ({ | ||
theme, | ||
label, | ||
...props | ||
}: { | ||
theme: string; | ||
label: string; | ||
}) => ( | ||
<div className="flex flex-col w-full"> | ||
<Label label={label} /> | ||
<input | ||
type="text" | ||
placeholder="0xabc..." | ||
className={clsx( | ||
"w-full mt-0 p-2.5 rounded-xl outline-none text-color-text-paper border-2 border-color-border focus:border-primary", | ||
{ "bg-color-paper-darker": theme === "dark" }, | ||
{ "bg-color-paper": theme === "light" } | ||
)} | ||
{...props} | ||
/> | ||
</div> | ||
); |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { ReactNode } from "react"; | ||
|
||
export const ButtonPrimary = ({ | ||
children, | ||
disabled = false, | ||
...props | ||
}: { | ||
children?: ReactNode; | ||
disabled?: boolean; | ||
}) => ( | ||
<button | ||
className={` | ||
bg-color-primary text-color-button-text text-lg font-semibold border-none shadow-none rounded-2xl | ||
relative min-h-[58px] transition-colors duration-200 ease-in-out mt-2 mb-2 flex flex-row flex-wrap items-center justify-center | ||
focus:shadow-none focus:transform-none focus:bg-color-primary-lighter | ||
hover:shadow-none hover:transform-none hover:bg-color-primary-lighter | ||
active:shadow-none active:transform-none active:bg-color-primary-lighter | ||
disabled:border-transparent disabled:outline-none disabled:cursor-auto disabled:shadow-none | ||
${ | ||
disabled | ||
? "disabled:bg-color-bg2 disabled:text-color-white disabled:opacity-70" | ||
: "disabled:bg-color-background disabled:text-color-info disabled:opacity-100" | ||
} | ||
`} | ||
disabled={disabled} | ||
{...props} | ||
> | ||
{children} | ||
</button> | ||
); |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { ReactNode } from "react"; | ||
|
||
export const ContentWrapper = ({ | ||
children, | ||
...props | ||
}: { | ||
children?: ReactNode; | ||
}) => ( | ||
<div | ||
className="flex flex-col flex-grow pt-2 items-center justify-center text-center" | ||
{...props} | ||
> | ||
{children} | ||
</div> | ||
); | ||
|
||
export const Wrapper = ({ children, ...props }: { children?: ReactNode }) => ( | ||
<div className="flex flex-col flex-wrap w-full flex-grow" {...props}> | ||
{children} | ||
</div> | ||
); |
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,3 +1,7 @@ | ||
import { default as Joana } from "./Joana"; | ||
import { Wrapper, ContentWrapper } from "./Wrapper"; | ||
import { AddressInput } from "./AddressInput"; | ||
import { ButtonPrimary } from "./ButtonPrimary"; | ||
|
||
export { Joana }; | ||
export { Wrapper, ContentWrapper }; | ||
export { AddressInput }; | ||
export { ButtonPrimary }; |