-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/magickbase/ckb-explorer-…
…frontend into develop
- Loading branch information
Showing
148 changed files
with
2,452 additions
and
2,328 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
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
.link { | ||
flex: 1; | ||
min-width: 0; | ||
color: var(--primary-color); | ||
|
||
&:hover { | ||
color: var(--primary-color); | ||
} | ||
} |
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 @@ | ||
.card { | ||
width: 100%; | ||
height: auto; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: flex-start; | ||
padding: 0 40px; | ||
background: #fff; | ||
box-shadow: 0 4px 4px 0 rgb(16 16 16 / 5%); | ||
|
||
&.rounded { | ||
border-radius: 4px; | ||
} | ||
|
||
&.roundedTop { | ||
border-radius: 4px 4px 0 0; | ||
} | ||
|
||
&.roundedBottom { | ||
border-radius: 0 0 4px 4px; | ||
} | ||
|
||
@media (width <= 750px) { | ||
padding: 0 16px; | ||
box-shadow: 1px 1px 3px 0 #dfdfdf; | ||
} | ||
} |
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 { ComponentProps, FC } from 'react' | ||
import classNames from 'classnames' | ||
import styles from './Card.module.scss' | ||
|
||
export interface CardProps extends ComponentProps<'div'> { | ||
rounded?: boolean | 'top' | 'bottom' | ||
} | ||
|
||
export const Card: FC<CardProps> = ({ children, rounded = true, ...elProps }) => { | ||
return ( | ||
<div | ||
{...elProps} | ||
className={classNames( | ||
styles.card, | ||
{ | ||
[styles.rounded]: rounded === true, | ||
[styles.roundedTop]: rounded === 'top', | ||
[styles.roundedBottom]: rounded === 'bottom', | ||
}, | ||
elProps.className, | ||
)} | ||
> | ||
{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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.cardCell { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
height: 20px; | ||
|
||
.left { | ||
display: flex; | ||
align-items: center; | ||
flex-shrink: 0; | ||
|
||
.icon { | ||
width: 48px; | ||
height: 48px; | ||
} | ||
|
||
.icon + .title { | ||
margin-left: 8px; | ||
} | ||
|
||
.title { | ||
display: flex; | ||
align-items: center; | ||
font-size: 16px; | ||
color: rgb(0 0 0 / 60%); | ||
} | ||
} | ||
|
||
.right { | ||
margin-left: 15px; | ||
display: flex; | ||
align-items: center; | ||
font-size: 16px; | ||
color: #000; | ||
min-width: 0; | ||
} | ||
|
||
@media (width <= 750px) { | ||
flex-direction: column; | ||
justify-content: initial; | ||
align-items: initial; | ||
height: auto; | ||
padding: 16px 0; | ||
|
||
.right { | ||
margin-left: 0; | ||
word-wrap: break-word; | ||
word-break: break-all; | ||
} | ||
} | ||
} |
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,39 @@ | ||
import { ComponentProps, FC, ReactNode } from 'react' | ||
import { TooltipProps } from 'antd' | ||
import classNames from 'classnames' | ||
import styles from './CardCell.module.scss' | ||
import { HelpTip } from '../HelpTip' | ||
|
||
export interface CardCellProps extends Omit<ComponentProps<'div'>, 'title' | 'content'> { | ||
icon?: ReactNode | ||
title: ReactNode | ||
tooltip?: TooltipProps['title'] | ||
content: ReactNode | ||
contentWrapperClass?: string | ||
contentTooltip?: TooltipProps['title'] | ||
} | ||
|
||
export const CardCell: FC<CardCellProps> = ({ | ||
icon, | ||
title, | ||
tooltip, | ||
content, | ||
contentWrapperClass, | ||
contentTooltip, | ||
...divProps | ||
}) => { | ||
return ( | ||
<div {...divProps} className={classNames(styles.cardCell, divProps.className)}> | ||
<div className={styles.left}> | ||
{icon && <div className={styles.icon}>{icon}</div>} | ||
<div className={styles.title}>{title}</div> | ||
{tooltip && <HelpTip title={tooltip} />} | ||
</div> | ||
|
||
<div className={classNames(styles.right, contentWrapperClass)}> | ||
{content} | ||
{contentTooltip && <HelpTip title={contentTooltip} />} | ||
</div> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.