From 5ffcf301590f5d59282a43a3659d430af289507f Mon Sep 17 00:00:00 2001 From: Stephen Sullivan Date: Fri, 18 Mar 2022 15:26:27 +0000 Subject: [PATCH] Added font weight to buttons --- react-native/components/createButtonComponent/index.tsx | 1 + react-native/types/ButtonStyle/index.tsx | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/react-native/components/createButtonComponent/index.tsx b/react-native/components/createButtonComponent/index.tsx index 1dfe17fc..bcfc8907 100644 --- a/react-native/components/createButtonComponent/index.tsx +++ b/react-native/components/createButtonComponent/index.tsx @@ -66,6 +66,7 @@ export const createButtonComponent = ( const textBase: TextStyle = { fontFamily: buttonStyle.fontFamily, fontSize: buttonStyle.fontSize, + fontWeight: buttonStyle.fontWeight, lineHeight: buttonStyle.fontSize * 1.4, }; diff --git a/react-native/types/ButtonStyle/index.tsx b/react-native/types/ButtonStyle/index.tsx index 346d0e7c..38d658ac 100644 --- a/react-native/types/ButtonStyle/index.tsx +++ b/react-native/types/ButtonStyle/index.tsx @@ -14,6 +14,11 @@ export type ButtonStyle = { */ readonly fontSize: number; + /** + * The weight of the text on the button. + */ + readonly fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | undefined; + /** * The amount of horizontal padding inside the button. */