-
Notifications
You must be signed in to change notification settings - Fork 826
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(project): fix url updating error fix(style): adjust style and order of packages list
- Loading branch information
Showing
30 changed files
with
586 additions
and
58 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
19 changes: 19 additions & 0 deletions
19
packages/flat-components/src/components/Pmi/PmiDesc.stories.tsx
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 @@ | ||
import React from "react"; | ||
import { Meta, Story } from "@storybook/react"; | ||
import { PmiDesc, PmiDescProps } from "."; | ||
|
||
const storyMeta: Meta = { | ||
title: "Pmi/PmiDesc", | ||
component: PmiDesc, | ||
}; | ||
|
||
export default storyMeta; | ||
|
||
export const Overview: Story<PmiDescProps> = props => { | ||
return <PmiDesc {...props} />; | ||
}; | ||
|
||
Overview.args = { | ||
text: "使用个人房间号", | ||
pmi: "1234 5678 900", | ||
}; |
18 changes: 18 additions & 0 deletions
18
packages/flat-components/src/components/Pmi/PmiExistTip/PmiExistTip.stories.tsx
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,18 @@ | ||
import React from "react"; | ||
import { Meta, Story } from "@storybook/react"; | ||
import { PmiExistTip, PmiExistTipProps } from "."; | ||
|
||
const storyMeta: Meta = { | ||
title: "Pmi/PmiExistTip", | ||
component: PmiExistTip, | ||
}; | ||
|
||
export default storyMeta; | ||
|
||
export const Overview: Story<PmiExistTipProps> = props => { | ||
return <PmiExistTip {...props} />; | ||
}; | ||
|
||
Overview.args = { | ||
title: "你的专属房间号,可使用该固定号码创建房间", | ||
}; |
22 changes: 22 additions & 0 deletions
22
packages/flat-components/src/components/Pmi/PmiExistTip/index.tsx
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,22 @@ | ||
import "./style.less"; | ||
|
||
import { Tooltip } from "antd"; | ||
import React, { FC } from "react"; | ||
import { useTranslate } from "@netless/flat-i18n"; | ||
import { QuestionCircleOutlined } from "@ant-design/icons"; | ||
|
||
export interface PmiExistTipProps { | ||
title?: string; | ||
} | ||
|
||
export const PmiExistTip: FC<PmiExistTipProps> = ({ title }) => { | ||
const t = useTranslate(); | ||
|
||
return ( | ||
<Tooltip className="pmi-room-help" title={title || t("pmi-room-exist")}> | ||
<QuestionCircleOutlined /> | ||
</Tooltip> | ||
); | ||
}; | ||
|
||
export default PmiExistTip; |
4 changes: 4 additions & 0 deletions
4
packages/flat-components/src/components/Pmi/PmiExistTip/style.less
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 @@ | ||
.pmi-room-help { | ||
margin-left: 4px; | ||
cursor: help; | ||
} |
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,20 @@ | ||
import "./style.less"; | ||
|
||
import React, { HTMLAttributes, FC } from "react"; | ||
export * from "./PmiExistTip"; | ||
|
||
export interface PmiDescProps extends HTMLAttributes<HTMLSpanElement> { | ||
text: string; | ||
pmi: string; | ||
} | ||
|
||
export const PmiDesc: FC<PmiDescProps> = ({ text, pmi, ...restProps }) => { | ||
return ( | ||
<span className="pmi" {...restProps}> | ||
<span className="pmi-text">{text}</span> | ||
<span className="pmi-id">{pmi}</span> | ||
</span> | ||
); | ||
}; | ||
|
||
export default PmiDesc; |
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,11 @@ | ||
.pmi-id { | ||
margin-left: 4px; | ||
color: var(--grey-3); | ||
} | ||
|
||
|
||
.flat-color-scheme-dark { | ||
.pmi-id { | ||
color: var(--grey-6); | ||
} | ||
} |
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
Oops, something went wrong.