@theroutingcompany/components 0.0.56 → 0.0.57
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/package.json
CHANGED
|
@@ -7,7 +7,7 @@ export type TextSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
|
7
7
|
export type FontStyle = 'normal' | 'italic';
|
|
8
8
|
export type TextElements = 'p' | 'div' | 'span' | 'legend' | 'caption' | 'figcaption' | 'strong' | 'em' | 'strong' | 'abbr' | 'mark' | 'q' | 'small' | 'time';
|
|
9
9
|
interface TextBaseProps {
|
|
10
|
-
|
|
10
|
+
variant: TextType;
|
|
11
11
|
fontStyle?: FontStyle;
|
|
12
12
|
textColor?: string;
|
|
13
13
|
fontWeight?: string;
|
|
@@ -16,12 +16,12 @@ interface TextBaseProps {
|
|
|
16
16
|
style?: React.CSSProperties;
|
|
17
17
|
}
|
|
18
18
|
interface BodyTextProps extends TextBaseProps {
|
|
19
|
-
|
|
19
|
+
variant: 'body';
|
|
20
20
|
as?: TextElements;
|
|
21
21
|
}
|
|
22
22
|
interface NumberTextProps extends ComponentPropsWithoutRef<'p'> {
|
|
23
23
|
size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
24
|
-
|
|
24
|
+
variant: 'number';
|
|
25
25
|
as?: TextElements;
|
|
26
26
|
}
|
|
27
27
|
export type TextProps = Partial<NumberTextProps | BodyTextProps> & {
|