Skip to content

The Open Standard for Generative UI

Update typography in theme presets (#178)

subham87481899b1fc
diff --git a/js/packages/react-ui/package.json b/js/packages/react-ui/package.json
index ae26f2800..ad33f46aa 100644
--- a/js/packages/react-ui/package.json
+++ b/js/packages/react-ui/package.json
@@ -2,7 +2,7 @@
"type": "module",
"name": "@crayonai/react-ui",
"license": "MIT",
- "version": "0.8.20",
+ "version": "0.8.21",
"description": "Component library for Generative UI SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
diff --git a/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts b/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts
index d658e46e2..a10e998b7 100644
--- a/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts
+++ b/js/packages/react-ui/src/components/ThemeProvider/themePresets.ts
@@ -1,29 +1,25 @@
const commonTheme = ({ font }: { font: string }) => ({
- fontPrimary: `400 16px/20px "${font}"`,
- fontHeadingLarge: `600 28px/32.2px "${font}"`,
- fontHeadingMedium: `600 24px/27.6px "${font}"`,
- fontHeadingSmall: `500 18px/22.5px "${font}"`,
- fontTitle: `500 16px/20px "${font}"`,
- fontTitleMedium: `500 16px/20px "${font}"`,
- fontTitleSmall: `500 16px/20px "${font}"`,
- fontBody: `400 16px/24px "${font}"`,
- fontBodyLargeHeavy: `500 18px/27px "${font}"`,
- fontBodyLarge: `400 18px/27px "${font}"`,
- fontBodyMedium: `400 16px/20px "${font}"`,
- fontBodySmall: `400 14px/21px "${font}"`,
- fontBodyHeavy: `500 16px/24px "${font}"`,
- fontBodySmallHeavy: `600 16px/20px "${font}"`,
- fontBodyLink: `500 16px/24px "${font}"`,
- fontLabelLarge: `400 16px/19.2px "${font}"`,
- fontLabelLargeHeavy: `500 16px/19.2px "${font}"`,
- fontLabel: `400 14px/16.8px "${font}"`,
- fontLabelHeavy: `500 14px/16.8px "${font}"`,
- fontLabelMedium: `400 16px/20px "${font}"`,
- fontLabelMediumHeavy: `600 16px/20px "${font}"`,
- fontLabelSmall: `400 12px/14.4px "${font}"`,
- fontLabelSmallHeavy: `500 12px/14.4px "${font}"`,
- fontLabelExtraSmall: `400 10px/12px "${font}"`,
- fontLabelExtraSmallHeavy: `500 10px/12px "${font}"`,
+ fontHeadingLarge: `600 28px/1.15 ${font}`,
+ fontHeadingMedium: `600 24px/1.15 ${font}`,
+ fontHeadingSmall: `500 18px/1.25 ${font}`,
+ fontHeadingExtraSmall: `500 16px/1.25 ${font}`,
+ fontBody: `400 16px/1.5 ${font}`,
+ fontBodySmall: `400 14px/1.5 ${font}`,
+ fontBodyHeavy: `500 16px/1.5 ${font}`,
+ fontBodySmallHeavy: `500 14px/1.5 ${font}`,
+ fontBodyLink: `400 16px/1.5 ${font}`,
+ fontBodyLarge: `400 18px/1.5 ${font}`,
+ fontBodyLargeHeavy: `500 18px/1.5 ${font}`,
+ fontLabelLarge: `400 18px/1.2 ${font}`,
+ fontLabelLargeHeavy: `500 18px/1.2 ${font}`,
+ fontLabel: `400 16px/1.2 ${font}`,
+ fontLabelHeavy: `500 16px/1.2 ${font}`,
+ fontLabelSmall: `400 14px/1.2 ${font}`,
+ fontLabelSmallHeavy: `500 14px/1.2 ${font}`,
+ fontLabelExtraSmall: `400 12px/1.2 ${font}`,
+ fontLabelExtraSmallHeavy: `500 12px/1.2 ${font}`,
+ fontLabel2ExtraSmall: `400 10px/1.2 ${font}`,
+ fontLabel2ExtraSmallHeavy: `500 10px/1.2 ${font}`,
shadowS: "0px 1px 2px rgba(0, 0, 0, 0.04)",
shadowM: "0px 4px 6px rgba(0, 0, 0, 0.04)",
shadowL: "0px 1px 8px rgba(0, 0, 0, 0.08)",