@bonprix-ds/react-typography 1.0.0
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.
- package/dist/index.d.ts +37 -0
- package/dist/index.js +1348 -0
- package/dist/index.js.map +1 -0
- package/package.json +47 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const Typography: FC<TypographyProps>;
|
|
6
|
+
export default Typography;
|
|
7
|
+
|
|
8
|
+
declare type TypographyColor = "inherit" | "primary" | "on-primary-high" | "on-primary-mid" | "on-bg-high" | "on-bg-mid" | "on-bg-low" | "error" | "alert" | "success" | "info" | "sale" | "on-sale" | "disabled" | "sustainable" | "black" | "white";
|
|
9
|
+
|
|
10
|
+
export declare interface TypographyProps {
|
|
11
|
+
/** The content of the Typography component. Might also be other markup elements. */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** A valid typography variant. */
|
|
14
|
+
variant?: TypographyVariant;
|
|
15
|
+
/** An HTML element, that should be used. */
|
|
16
|
+
component?: ElementType;
|
|
17
|
+
/** If `true`, the text will be bold. */
|
|
18
|
+
bold?: boolean;
|
|
19
|
+
/** If `true`, the text will be displayed with a strikethrough. */
|
|
20
|
+
strikeThrough?: boolean;
|
|
21
|
+
/** A valid color variant. */
|
|
22
|
+
color?: TypographyColor;
|
|
23
|
+
/** The horizontal text alignment. */
|
|
24
|
+
align?: "left" | "center" | "right";
|
|
25
|
+
/** Adds Ellipsis when text doesn't fit. */
|
|
26
|
+
truncate?: boolean;
|
|
27
|
+
/** Additional class names to apply to the component. */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Id of the component. */
|
|
30
|
+
id?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare type TypographyVariant = (typeof typographyVariants)[number];
|
|
34
|
+
|
|
35
|
+
export declare const typographyVariants: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "bonprix-h1", "bonprix-h2", "bonprix-h3", "bonprix-h4", "bonprix-h5", "bonprix-h6", "body1", "body1-bold", "body2", "body2-bold", "subtitle1", "subtitle2", "caption", "overline"];
|
|
36
|
+
|
|
37
|
+
export { }
|