Skip to content

Commit

Permalink
chore: add weight type defination in Text
Browse files Browse the repository at this point in the history
  • Loading branch information
YyumeiZhang committed Jun 5, 2024
1 parent 4d2fcb4 commit 161d475
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/semi-ui/typography/_story/typography.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ stories.add('Text', () => (
<br />
<Text link={{ href: 'https://semi.design/' }}>打开网站</Text>
<br />
<Text link ><Icon type="link" />网页链接</Text>
<Text link weight={700}><Icon type="link" />网页链接</Text>
</div>
));

Expand Down
4 changes: 3 additions & 1 deletion packages/semi-ui/typography/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export interface TextProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, O
strong?: boolean;
style?: React.CSSProperties;
type?: TypographyBaseType;
underline?: boolean
underline?: boolean;
weight?: number
}

export default class Text extends PureComponent<TextProps> {
Expand All @@ -64,6 +65,7 @@ export default class Text extends PureComponent<TextProps> {
className: PropTypes.string,
code: PropTypes.bool,
component: PropTypes.string,
weight: PropTypes.number,
};

static defaultProps = {
Expand Down

0 comments on commit 161d475

Please sign in to comment.