Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

docs(docsite): add React and StyleX attribution to hero (#2055)

Cindy Zhang5630afcdcabc
diff --git a/apps/docsite/src/app/(docs)/page.tsx b/apps/docsite/src/app/(docs)/page.tsx
index d6fc8d0177..58d7af93b8 100644
--- a/apps/docsite/src/app/(docs)/page.tsx
+++ b/apps/docsite/src/app/(docs)/page.tsx
@@ -200,7 +200,21 @@ export default function HomePage() {
xstyle={styles.heroDescription}>
An open design system for building internal tools with
AI-powered development. Ship faster with {coreCount} accessible,
- themeable components.
+ themeable components. Made with{' '}
+ <XDSLink
+ type="inherit"
+ color="secondary"
+ href="https://react.dev">
+ React
+ </XDSLink>
+ {' and '}
+ <XDSLink
+ type="inherit"
+ color="secondary"
+ href="https://stylexjs.com">
+ StyleX
+ </XDSLink>
+ .
</XDSText>
<XDSHStack gap={3} xstyle={styles.heroButtons}>
<XDSButton
diff --git a/packages/core/src/Text/XDSText.tsx b/packages/core/src/Text/XDSText.tsx
index d611600f6d..8fa10b8ac4 100644
--- a/packages/core/src/Text/XDSText.tsx
+++ b/packages/core/src/Text/XDSText.tsx
@@ -157,6 +157,7 @@ const defaultColorByType: Record<string, XDSTextColor> = {
'display-1': 'primary',
'display-2': 'primary',
'display-3': 'primary',
+ inherit: 'inherit',
};
/**
diff --git a/packages/core/src/Text/text.stylex.ts b/packages/core/src/Text/text.stylex.ts
index 7c29f99ba2..8b3d0e72a1 100644
--- a/packages/core/src/Text/text.stylex.ts
+++ b/packages/core/src/Text/text.stylex.ts
@@ -89,6 +89,9 @@ export const defaultWeightByTypeStyles = stylex.create({
'display-3': {
fontWeight: typeScaleVars['--text-display-3-weight'],
},
+ inherit: {
+ fontWeight: 'inherit',
+ },
});
// =============================================================================
@@ -133,6 +136,10 @@ export const sizeByTypeStyles = stylex.create({
fontSize: typeScaleVars['--text-display-3-size'],
lineHeight: typeScaleVars['--text-display-3-leading'],
},
+ inherit: {
+ fontSize: 'inherit',
+ lineHeight: 'inherit',
+ },
});
// =============================================================================
diff --git a/packages/core/src/theme/types.ts b/packages/core/src/theme/types.ts
index c191ba44a9..3502c1a257 100644
--- a/packages/core/src/theme/types.ts
+++ b/packages/core/src/theme/types.ts
@@ -119,7 +119,8 @@ export type XDSBuiltinTextType =
| 'code'
| 'display-1'
| 'display-2'
- | 'display-3';
+ | 'display-3'
+ | 'inherit';
/**
* Semantic text types for XDSText.