@guardian/stand 0.0.67 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,17 +2,19 @@ import { DefaultProps } from "../../util/types.cjs";
|
|
|
2
2
|
import { SemanticTypography } from "../../styleD/build/typescript/semantic/typography.cjs";
|
|
3
3
|
import { TypographyTheme } from "./styles.cjs";
|
|
4
4
|
import { TextProps } from "react-aria-components";
|
|
5
|
+
import { JSX } from "react";
|
|
5
6
|
//#region src/components/Typography/types.d.ts
|
|
6
7
|
type TypographyVariant = keyof SemanticTypography;
|
|
8
|
+
type TypographyElement = keyof JSX.IntrinsicElements | (string & {});
|
|
7
9
|
interface TypographyProps extends DefaultProps<TypographyTheme, TextProps['className']>, Omit<TextProps, 'elementType' | 'className'> {
|
|
8
10
|
/**
|
|
9
11
|
* HTML element to render with font applied to
|
|
10
12
|
*/
|
|
11
|
-
element?:
|
|
13
|
+
element?: TypographyElement;
|
|
12
14
|
/**
|
|
13
15
|
* Font variant to apply as a CSS style to the element
|
|
14
16
|
*/
|
|
15
17
|
variant?: TypographyVariant;
|
|
16
18
|
}
|
|
17
19
|
//#endregion
|
|
18
|
-
export { TypographyProps, TypographyVariant };
|
|
20
|
+
export { TypographyElement, TypographyProps, TypographyVariant };
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { DefaultProps } from "../../util/types.js";
|
|
2
2
|
import { SemanticTypography } from "../../styleD/build/typescript/semantic/typography.js";
|
|
3
3
|
import { TypographyTheme } from "./styles.js";
|
|
4
|
+
import { JSX } from "react";
|
|
4
5
|
import { TextProps } from "react-aria-components";
|
|
5
6
|
//#region src/components/Typography/types.d.ts
|
|
6
7
|
type TypographyVariant = keyof SemanticTypography;
|
|
8
|
+
type TypographyElement = keyof JSX.IntrinsicElements | (string & {});
|
|
7
9
|
interface TypographyProps extends DefaultProps<TypographyTheme, TextProps['className']>, Omit<TextProps, 'elementType' | 'className'> {
|
|
8
10
|
/**
|
|
9
11
|
* HTML element to render with font applied to
|
|
10
12
|
*/
|
|
11
|
-
element?:
|
|
13
|
+
element?: TypographyElement;
|
|
12
14
|
/**
|
|
13
15
|
* Font variant to apply as a CSS style to the element
|
|
14
16
|
*/
|
|
15
17
|
variant?: TypographyVariant;
|
|
16
18
|
}
|
|
17
19
|
//#endregion
|
|
18
|
-
export { TypographyProps, TypographyVariant };
|
|
20
|
+
export { TypographyElement, TypographyProps, TypographyVariant };
|