forked from nervosnetwork/ckb-explorer-frontend
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(inscription): new ui * feat(inscriptioN): use link instead of a * fix(inscription): use li in the ul * fix(inscription): overflow * fix(inscription): radius
- Loading branch information
Showing
6 changed files
with
139 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import classNames from 'classnames' | ||
import styles from './inscription.module.scss' | ||
import { Link } from '../../components/Link' | ||
|
||
const Inscription = ({ | ||
href, | ||
udtLabel, | ||
mintingStatus, | ||
content, | ||
}: { | ||
content: Record<string, string> | ||
href: string | ||
mintingStatus?: string | ||
udtLabel: string | ||
}) => { | ||
return ( | ||
<Link to={href} className={styles.container}> | ||
<h5> | ||
<span className="monospace">{udtLabel}</span> | ||
<span className="monospace">{mintingStatus}</span> | ||
</h5> | ||
<div className={styles.content}> | ||
{'{'} | ||
{Object.entries(content).map(([key, value]) => ( | ||
<div className={classNames('monospace', styles.jsonValue)}> | ||
<div className={classNames('monospace', styles.title)}>{key}:</div> | ||
<div className={classNames('monospace', styles.value)}>{value}</div> | ||
</div> | ||
))} | ||
{'}'} | ||
</div> | ||
</Link> | ||
) | ||
} | ||
|
||
export default Inscription |
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,50 @@ | ||
// @import '../../../styles//variables.module.scss'; | ||
|
||
.container { | ||
min-width: 250px; | ||
min-height: 86px; | ||
background: #fff; | ||
overflow: hidden; | ||
max-width: 287px; | ||
border-radius: 4px; | ||
display: block; | ||
|
||
h5 { | ||
height: 30px; | ||
background-color: #f8b83c; | ||
display: flex; | ||
justify-content: space-between; | ||
padding: 8px 8px 6px; | ||
margin: 0; | ||
color: #333; | ||
font-size: 12px; | ||
font-style: normal; | ||
font-weight: 500; | ||
line-height: normal; | ||
text-transform: capitalize; | ||
} | ||
|
||
.content { | ||
height: 90px; | ||
overflow-y: scroll; | ||
padding: 8px; | ||
background-color: #000; | ||
width: 100%; | ||
color: #fff; | ||
text-wrap: nowrap; | ||
|
||
.jsonValue { | ||
.value { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
flex-grow: 1; | ||
} | ||
|
||
padding-left: 2em; | ||
width: 100%; | ||
overflow: hidden; | ||
max-width: 100%; | ||
display: flex; | ||
} | ||
} | ||
} |
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