-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into GSW-31_token-detai…
…l-ui
- Loading branch information
Showing
229 changed files
with
7,967 additions
and
3,615 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
NEXT_PUBLIC_API_URL="https://mock-api.gnoswap.io/v3/testnet" | ||
NEXT_PUBLIC_DEFAULT_CHAIN_ID="dev.gnoswap" | ||
NEXT_PUBLIC_API_URL="https://dev-api.gnoswap.io/v3/testnet" | ||
NEXT_PUBLIC_PACKAGE_POOL_PATH="gno.land/r/pool" | ||
NEXT_PUBLIC_PACKAGE_POOL_ADDRESS="g1ee305k8yk0pjz443xpwtqdyep522f9g5r7d63w" | ||
NEXT_PUBLIC_PACKAGE_POSITION_PATH="gno.land/r/position" | ||
NEXT_PUBLIC_PACKAGE_POSITION_ADDRESS="g1htpxzv2dkplvzg50nd8fswrneaxmdpwn459thx" |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
37 changes: 37 additions & 0 deletions
37
packages/web/src/components/common/form-input/FormInput.styles.ts
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,37 @@ | ||
import { fonts } from "@constants/font.constant"; | ||
import styled from "@emotion/styled"; | ||
import { media } from "@styles/media"; | ||
import mixins from "@styles/mixins"; | ||
|
||
export const FormInputWrapper = styled.div` | ||
${mixins.flexbox("column", "flex-start", "flex-start")}; | ||
width: 100%; | ||
gap: 6px; | ||
.error-text { | ||
color: ${({ theme }) => theme.color.red02}; | ||
${fonts.p4} | ||
${media.mobile} { | ||
${fonts.p6} | ||
} | ||
} | ||
`; | ||
|
||
export const FormInputStyle = styled.input` | ||
width: 100%; | ||
border-radius: 8px; | ||
padding: 16px; | ||
background-color: ${({ theme }) => theme.color.backgroundOpacity2}; | ||
color: ${({ theme }) => theme.color.text01}; | ||
border: 1px solid ${({ theme }) => theme.color.border02}; | ||
${fonts.body9} | ||
${media.mobile} { | ||
${fonts.body11} | ||
} | ||
&::placeholder { | ||
color: ${({ theme }) => theme.color.text04}; | ||
${fonts.body9} | ||
${media.mobile} { | ||
${fonts.body11} | ||
} | ||
} | ||
`; |
30 changes: 30 additions & 0 deletions
30
packages/web/src/components/common/form-input/FormInput.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React, { FC, memo } from "react"; | ||
import { FormInputStyle, FormInputWrapper } from "./FormInput.styles"; | ||
|
||
interface ParentProps { | ||
className?: string; | ||
} | ||
|
||
type Props = { | ||
placeholder?: string; | ||
name: string; | ||
type?: string; | ||
errorText?: any; | ||
parentProps?: ParentProps; | ||
}; | ||
|
||
const FormInput: FC<Props> = React.forwardRef<HTMLInputElement, Props>( | ||
(props, ref) => { | ||
const { errorText, parentProps } = props; | ||
return ( | ||
<FormInputWrapper {...parentProps}> | ||
<FormInputStyle {...props} ref={ref} /> | ||
{errorText && <div className="error-text">{errorText}</div>} | ||
</FormInputWrapper> | ||
); | ||
}, | ||
); | ||
|
||
FormInput.displayName = "FormInput"; | ||
|
||
export default memo(FormInput); |
34 changes: 34 additions & 0 deletions
34
packages/web/src/components/common/form-textarea/FormTextArea.styles.ts
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,34 @@ | ||
import { fonts } from "@constants/font.constant"; | ||
import styled from "@emotion/styled"; | ||
import { media } from "@styles/media"; | ||
import mixins from "@styles/mixins"; | ||
|
||
export const FormTextAreaWrapper = styled.div` | ||
${mixins.flexbox("column", "flex-start", "flex-start")}; | ||
width: 100%; | ||
gap: 6px; | ||
.error-text { | ||
color: ${({ theme }) => theme.color.red02}; | ||
${fonts.p4} | ||
${media.mobile} { | ||
${fonts.p6} | ||
} | ||
} | ||
`; | ||
|
||
export const FormTextAreaStyle = styled.textarea` | ||
width: 100%; | ||
border-radius: 8px; | ||
padding: 16px; | ||
background-color: ${({ theme }) => theme.color.backgroundOpacity2}; | ||
color: ${({ theme }) => theme.color.text01}; | ||
border: 1px solid ${({ theme }) => theme.color.border02}; | ||
resize: none; | ||
&::placeholder { | ||
color: ${({ theme }) => theme.color.text04}; | ||
${fonts.body9} | ||
${media.mobile} { | ||
${fonts.body11} | ||
} | ||
} | ||
`; |
26 changes: 26 additions & 0 deletions
26
packages/web/src/components/common/form-textarea/FormTextArea.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React, { FC, memo } from "react"; | ||
import { FormTextAreaStyle, FormTextAreaWrapper } from "./FormTextArea.styles"; | ||
|
||
type Props = { | ||
errorText?: any; | ||
placeholder: string; | ||
name: string; | ||
rows: number; | ||
}; | ||
|
||
const TextArea: FC<Props> = React.forwardRef<HTMLTextAreaElement, Props>( | ||
(props, ref) => { | ||
const { errorText } = props; | ||
|
||
return ( | ||
<FormTextAreaWrapper> | ||
<FormTextAreaStyle {...props} ref={ref} /> | ||
{errorText && <div className="error-text">{errorText}</div>} | ||
</FormTextAreaWrapper> | ||
); | ||
}, | ||
); | ||
|
||
TextArea.displayName = "TextArea"; | ||
|
||
export default memo(TextArea); |
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,27 @@ | ||
import React from "react"; | ||
import { | ||
FormProvider as HookFormProvider, | ||
UseFormReturn, | ||
SubmitHandler, | ||
FieldValues, | ||
} from "react-hook-form"; | ||
|
||
interface Props<TFormValue extends FieldValues> { | ||
methods: UseFormReturn<TFormValue, any>; | ||
onSubmit: SubmitHandler<TFormValue>; | ||
children?: React.ReactNode; | ||
} | ||
|
||
const FormProvider = <TFormValue extends FieldValues>({ | ||
methods, | ||
onSubmit, | ||
children, | ||
}: Props<TFormValue>) => { | ||
return ( | ||
<HookFormProvider {...methods}> | ||
<form onSubmit={methods.handleSubmit(onSubmit)}>{children}</form> | ||
</HookFormProvider> | ||
); | ||
}; | ||
|
||
export default FormProvider; |
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,18 @@ | ||
const IconFile = ({ className }: { className?: string }) => ( | ||
<svg | ||
width="16" | ||
height="16" | ||
viewBox="0 0 16 16" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
className={className} | ||
> | ||
<path | ||
d="M12.667 3.333v6H9.333v3.334h-6V3.333h9.334zm0-1.333H3.333C2.6 2 2 2.6 2 3.333v9.334C2 13.4 2.6 14 3.333 14H10l4-4V3.333C14 2.6 13.4 2 12.667 2zM8 9.333H4.667V8H8v1.333zm3.333-2.666H4.667V5.333h6.666v1.334z" | ||
fill="#596782" | ||
/> | ||
</svg> | ||
); | ||
|
||
export default IconFile; | ||
|
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,19 @@ | ||
const IconNewTab = ({ className }: { className?: string }) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="16" | ||
height="17" | ||
fill="none" | ||
viewBox="0 0 16 17" | ||
className={className} | ||
> | ||
<path | ||
fill="#596782" | ||
fillRule="evenodd" | ||
d="M3.333 3.833v9.334h9.334V8.5H14v4.667c0 .733-.6 1.333-1.333 1.333H3.333C2.593 14.5 2 13.9 2 13.167V3.833C2 3.1 2.593 2.5 3.333 2.5H8v1.333H3.333zm6.16 0V2.5h4.667v4.667h-1.333V4.773l-6.554 6.554-.94-.94 6.554-6.554H9.493z" | ||
clipRule="evenodd" | ||
></path> | ||
</svg> | ||
); | ||
|
||
export default IconNewTab; |
Oops, something went wrong.