-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from terra-money/dev/add-wallet-connection
Dev/add wallet connection
- Loading branch information
Showing
71 changed files
with
2,735 additions
and
288 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,21 +1,28 @@ | ||
import { useState } from 'react'; | ||
import classNames from 'classnames/bind'; | ||
import Navigation from './components/navigations/Navigation'; | ||
import { useNav } from './config/routes'; | ||
import styles from './App.module.scss'; | ||
import { useState } from "react" | ||
import classNames from "classnames/bind" | ||
import Navigation from "./components/navigations/Navigation" | ||
import { useNav } from "./config/routes" | ||
import styles from "./App.module.scss" | ||
|
||
const cx = classNames.bind(styles); | ||
const cx = classNames.bind(styles) | ||
|
||
const App = () => { | ||
const { element: routes } = useNav(); | ||
const [isMobileNavOpen, setMobileNavOpen] = useState(false); | ||
const { element: routes } = useNav() | ||
const [isMobileNavOpen, setMobileNavOpen] = useState(false) | ||
|
||
return ( | ||
<div className={cx(styles.main__container, { [styles.mobile__nav__open]: isMobileNavOpen })}> | ||
<Navigation isMobileNavOpen={isMobileNavOpen} setMobileNavOpen={setMobileNavOpen} /> | ||
<div | ||
className={cx(styles.main__container, { | ||
[styles.mobile__nav__open]: isMobileNavOpen, | ||
})} | ||
> | ||
<Navigation | ||
isMobileNavOpen={isMobileNavOpen} | ||
setMobileNavOpen={setMobileNavOpen} | ||
/> | ||
{routes} | ||
</div> | ||
); | ||
}; | ||
) | ||
} | ||
|
||
export default App; | ||
export default App |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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,58 @@ | ||
// @import 'scss/font_mixins'; | ||
|
||
.checkbox { | ||
display: inline-flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
cursor: pointer; | ||
gap: 8px; | ||
user-select: none; | ||
|
||
&.checked .indicator { | ||
opacity: 1; | ||
} | ||
|
||
&.disabled { | ||
cursor: not-allowed; | ||
opacity: 0.5; | ||
} | ||
|
||
.text { | ||
flex: 1; | ||
// @include Small; | ||
color: var(--token-dark-500); | ||
} | ||
|
||
&.checked { | ||
.track { | ||
border: solid 1px var(--token-primary-400); | ||
} | ||
|
||
.text { | ||
color: var(--token-light-white); | ||
transition: color 100ms; | ||
} | ||
} | ||
} | ||
|
||
.track { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
border: solid 1px var(--token-dark-500); | ||
border-radius: 6px; | ||
width: 18px; | ||
height: 18px; | ||
} | ||
|
||
.indicator { | ||
background: var(--token-primary-500); | ||
border-radius: 2px; | ||
width: 8px; | ||
height: 8px; | ||
|
||
opacity: 0; | ||
transition: opacity 100ms; | ||
} |
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 { ForwardedRef, forwardRef, InputHTMLAttributes } from 'react'; | ||
import classNames from 'classnames/bind'; | ||
import styles from './checkbox.module.scss'; | ||
|
||
const cx = classNames.bind(styles); | ||
|
||
export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> { | ||
label: string | ||
checked?: boolean | ||
} | ||
|
||
const Checkbox = forwardRef( | ||
( | ||
{ className, label, checked, ...attrs }: CheckboxProps, | ||
ref: ForwardedRef<HTMLInputElement> | ||
) => { | ||
const { disabled } = attrs; | ||
return ( | ||
<label className={cx(styles.checkbox, { checked, disabled }, className)}> | ||
<input {...attrs} type='checkbox' hidden ref={ref} /> | ||
<span className={styles.track}> | ||
<span className={styles.indicator} /> | ||
</span> | ||
<span className={styles.text}>{label}</span> | ||
</label> | ||
); | ||
}, | ||
); | ||
|
||
export default Checkbox; |
Oops, something went wrong.