From 8cba9b471ac0d3937b9edf93bf2b70d351d0358c Mon Sep 17 00:00:00 2001 From: "m.samimi" Date: Sun, 3 Jul 2022 18:02:48 +0430 Subject: [PATCH 1/2] add semi bold font variant --- src/component/src/molecules/text/index.tsx | 2 +- src/component/src/molecules/text/styles.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/component/src/molecules/text/index.tsx b/src/component/src/molecules/text/index.tsx index c46919e..aad3860 100644 --- a/src/component/src/molecules/text/index.tsx +++ b/src/component/src/molecules/text/index.tsx @@ -4,7 +4,7 @@ import { BaseText, BaseTextProps } from "./base"; import { fonts, fontSizes, fontWeights, useThemes } from "./styles"; interface TextProps extends BaseTextProps { - theme?: "medium" | "regular" | "light" | "bold"; + theme?: "medium" | "regular" | "light" | "bold" | "semiBold"; lang?: "fa" | "en"; weight?: keyof typeof fontWeights | number; color?: string; diff --git a/src/component/src/molecules/text/styles.ts b/src/component/src/molecules/text/styles.ts index 825297e..3a33f28 100644 --- a/src/component/src/molecules/text/styles.ts +++ b/src/component/src/molecules/text/styles.ts @@ -98,6 +98,16 @@ export const fonts = { url: YekanBakhFaBold, format: "woff", }, + "semiBold-en": { + name: "RobotoBold", + url: RobotoBold, + format: "woff", + }, + "semiBold-fa": { + name: "YekanBakhFaBold", + url: YekanBakhFaBold, + format: "woff", + }, }; let _useThemes: (() => Record) | undefined; From e086242e587c4334bf564186b1ada3855492a76c Mon Sep 17 00:00:00 2001 From: "m.samimi" Date: Sun, 3 Jul 2022 18:07:35 +0430 Subject: [PATCH 2/2] test pass --- .../text/__tests__/__snapshots__/mount.test.ts.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/component/src/molecules/text/__tests__/__snapshots__/mount.test.ts.snap b/src/component/src/molecules/text/__tests__/__snapshots__/mount.test.ts.snap index 3dce41a..e39e2b6 100644 --- a/src/component/src/molecules/text/__tests__/__snapshots__/mount.test.ts.snap +++ b/src/component/src/molecules/text/__tests__/__snapshots__/mount.test.ts.snap @@ -3,7 +3,7 @@ exports[`mount and unmount component could be updated and unmounted without errors 1`] = `

@@ -12,7 +12,7 @@ exports[`mount and unmount component could be updated and unmounted without erro exports[`mount and unmount component could be updated and unmounted without errors 2`] = `

@@ -22,7 +22,7 @@ exports[`mount and unmount component could be updated and unmounted without erro exports[`mount and unmount component could be updated and unmounted without errors 3`] = `

@@ -31,7 +31,7 @@ exports[`mount and unmount component could be updated and unmounted without erro exports[`mount and unmount component could be updated and unmounted without errors 4`] = `