-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[launcher] style: improve messaging on restore wallet form (#3032)
- Loading branch information
1 parent
74e2fb0
commit 2912ea7
Showing
5 changed files
with
205 additions
and
91 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { useState } from "react"; | ||
import styles from "./shared.module.css"; | ||
import { classNames } from "pi-ui"; | ||
import PropTypes from "prop-types"; | ||
|
||
const Collapse = ({ isInfo, header, content }) => { | ||
const [show, setShow] = useState(false); | ||
return ( | ||
<div className={classNames(styles.collapse, isInfo && styles.info)}> | ||
<div onClick={() => setShow(!show)}>{header}</div> | ||
<div | ||
className={classNames(styles.readMoreIcon, show && styles.active)} | ||
onClick={() => setShow(!show)} | ||
/> | ||
{show && <div className={styles.content}>{content}</div>} | ||
</div> | ||
); | ||
}; | ||
|
||
Collapse.propTypes = { | ||
header: PropTypes.node.isRequired, | ||
content: PropTypes.node.isRequired, | ||
isInfo: PropTypes.bool | ||
}; | ||
|
||
export default Collapse; |
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