diff --git a/packages/react-components/src/components/Typography/Text.tsx b/packages/react-components/src/components/Typography/Text.tsx index f5740c68e..37982f254 100644 --- a/packages/react-components/src/components/Typography/Text.tsx +++ b/packages/react-components/src/components/Typography/Text.tsx @@ -22,6 +22,8 @@ interface IProps extends React.HTMLAttributes { uppercase?: boolean; /** Optional prop to set the bold */ bold?: boolean; + /** Optional prop to set the semi-bold */ + semiBold?: boolean; /** Optional prop to set the underline */ underline?: boolean; /** Optional prop to set the strike */ @@ -40,6 +42,7 @@ export const Text: React.FC> = ({ caps = false, uppercase = false, bold = false, + semiBold = false, underline = false, strike = false, children, @@ -57,7 +60,8 @@ export const Text: React.FC> = ({ className: cx( { [styles[`${baseClassPrefix}-${size}`]]: true, - [styles[`${baseClassPrefix}--bold`]]: bold, + [styles[`${baseClassPrefix}--semi-bold`]]: semiBold && !bold, + [styles[`${baseClassPrefix}--bold`]]: bold && !semiBold, [styles[`${baseClassPrefix}--strike`]]: strike, [styles[`${baseClassPrefix}--underline`]]: underline, [styles[`${baseClassPrefix}--uppercase`]]: uppercase || caps, diff --git a/packages/react-components/src/components/Typography/Typography.module.scss b/packages/react-components/src/components/Typography/Typography.module.scss index f4a2d636d..dcf210815 100644 --- a/packages/react-components/src/components/Typography/Typography.module.scss +++ b/packages/react-components/src/components/Typography/Typography.module.scss @@ -162,6 +162,10 @@ } .paragraph { + &--semi-bold { + font-weight: 500; + } + &--bold { font-weight: 600; } diff --git a/packages/react-components/src/stories/foundations/Typography/components/TextExamples.tsx b/packages/react-components/src/stories/foundations/Typography/components/TextExamples.tsx index 72e382b6f..51872e838 100644 --- a/packages/react-components/src/stories/foundations/Typography/components/TextExamples.tsx +++ b/packages/react-components/src/stories/foundations/Typography/components/TextExamples.tsx @@ -12,6 +12,9 @@ export const TextExamples: React.FC = () => { Paragraph {size.toUpperCase()} with bold + + Paragraph {size.toUpperCase()} with semi-bold + Paragraph {size.toUpperCase()} with underline