-
Notifications
You must be signed in to change notification settings - Fork 2
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 #101 from subquery/feat/tag
feat: more components update
- Loading branch information
Showing
23 changed files
with
276 additions
and
187 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,19 @@ | ||
.subql-progress { | ||
|
||
.ant-progress-bg { | ||
background-color: var(--sq-blue600); | ||
} | ||
|
||
&.ant-progress-status-success { | ||
.ant-progress-bg { | ||
background-color: var(--sq-blue600); | ||
} | ||
.ant-progress-text { | ||
display: none; | ||
} | ||
|
||
.ant-progress-outer { | ||
padding-inline-end: 0; | ||
} | ||
} | ||
} |
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
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,33 @@ | ||
.subql-steps { | ||
font-family: var(--sq-font-family); | ||
|
||
.ant-steps-item-process { | ||
.ant-steps-item-icon { | ||
background-color: var(--sq-blue600); | ||
border-color: var(--sq-blue600); | ||
} | ||
} | ||
|
||
.ant-steps-item-finish { | ||
.ant-steps-item-icon { | ||
background-color: transparent; | ||
border-color: var(--sq-blue600); | ||
} | ||
} | ||
|
||
.ant-steps-item-wait { | ||
.ant-steps-item-icon { | ||
background-color: transparent; | ||
border-color: var(--sq-gray400); | ||
.ant-steps-icon { | ||
color: var(--sq-gray400); | ||
} | ||
} | ||
|
||
.ant-steps-item-content { | ||
.ant-steps-item-title.ant-steps-item-title.ant-steps-item-title { | ||
color: var(--sq-gray600); | ||
} | ||
} | ||
} | ||
} |
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
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,4 @@ | ||
// Copyright 2020-2022 SubQuery Pte Ltd authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
export * from './subqlCard'; |
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 @@ | ||
.subql-card { | ||
border-radius: 8px; | ||
border: 1px solid rgba(223, 227, 232, 0.6); | ||
background: #fff; | ||
box-shadow: 0px 1px 8px 0px rgba(67, 136, 221, 0.12); | ||
flex-shrink: 0; | ||
font-family: var(--sq-font-family); | ||
.ant-card-head { | ||
padding: 20px; | ||
padding-bottom: 12px; | ||
border-bottom: none; | ||
|
||
&-title { | ||
padding: 0; | ||
} | ||
} | ||
|
||
.ant-card-body { | ||
padding: 20px; | ||
padding-top: 12px; | ||
} | ||
|
||
&--split { | ||
width: 100%; | ||
height: 1px; | ||
background: var(--sq-gray300); | ||
transform: translateY(-12px); | ||
} | ||
|
||
&--withoutBody { | ||
.ant-card-head { | ||
padding-bottom: 20px; | ||
} | ||
|
||
.ant-card-body { | ||
display: none; | ||
} | ||
} | ||
} |
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,59 @@ | ||
// Copyright 2020-2022 SubQuery Pte Ltd authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import React, { FC } from 'react'; | ||
import { BsInfoCircle } from 'react-icons/bs'; | ||
import { Typography } from '@subql/components'; | ||
import { Card, CardProps, Tooltip } from 'antd'; | ||
import clsx from 'clsx'; | ||
import { isString } from 'lodash-es'; | ||
|
||
import './subqlCard.less'; | ||
import { useBem } from 'components/utilities/useBem'; | ||
|
||
interface SubqlCardProps extends CardProps { | ||
title?: React.ReactNode; | ||
titleExtra?: React.ReactNode; | ||
tooltip?: React.ReactNode; | ||
children?: React.ReactNode; | ||
width?: number; | ||
style?: React.CSSProperties; | ||
} | ||
|
||
export const SubqlCard: FC<SubqlCardProps> = ({ | ||
children, | ||
title, | ||
titleExtra, | ||
tooltip, | ||
width, | ||
style, | ||
className, | ||
...rest | ||
}) => { | ||
const bem = useBem('subql-card'); | ||
return ( | ||
<Card | ||
{...rest} | ||
className={clsx(bem({ withoutBody: !children ? 'withoutBody' : undefined }), className)} | ||
title={ | ||
<div className="col-flex"> | ||
<div style={{ display: 'flex', alignItems: 'center' }}> | ||
{isString(title) ? <Typography>{title}</Typography> : title} | ||
{tooltip ? ( | ||
<Tooltip title={tooltip}> | ||
<BsInfoCircle style={{ color: 'var(--sq-gray500)', fontSize: 14, marginLeft: 8 }}></BsInfoCircle> | ||
</Tooltip> | ||
) : ( | ||
'' | ||
)} | ||
</div> | ||
<div style={{ marginTop: 12 }}>{titleExtra}</div> | ||
</div> | ||
} | ||
style={{ width: width ? `${width}px` : 'auto', ...style }} | ||
> | ||
{children && <div className={clsx(bem(['split']))}></div>} | ||
{children} | ||
</Card> | ||
); | ||
}; |
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,4 @@ | ||
// Copyright 2020-2022 SubQuery Pte Ltd authors & contributors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
export * from './subqlTabs'; |
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,21 @@ | ||
.subql-tabs { | ||
.ant-tabs-tab { | ||
color: var(--sq-gray500); | ||
font-size: 18px; | ||
|
||
& + .ant-tabs-tab { | ||
margin: 0 0 0 24px; | ||
} | ||
|
||
&-btn { | ||
display: inline-flex; | ||
align-items: center; | ||
} | ||
} | ||
.ant-tabs-ink-bar { | ||
background: var(--sq-blue600); | ||
} | ||
.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn { | ||
color: var(--sq-gray900); | ||
} | ||
} |
Oops, something went wrong.