gantri-components 2.34.0 → 2.35.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.
|
@@ -2,6 +2,7 @@ import { Property } from 'csstype';
|
|
|
2
2
|
import { DefaultTheme } from 'styled-components';
|
|
3
3
|
import { AriaAttributes, CSSProperties } from 'react';
|
|
4
4
|
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
5
|
+
import { BoxDimension } from '../box/box.types';
|
|
5
6
|
export type TextAlign = 'string' | 'left' | 'center' | 'right' | 'unset';
|
|
6
7
|
export type TypographyColor = keyof DefaultTheme['colors']['typography'];
|
|
7
8
|
export type TextVariant = 'p0' | 'p1' | 'p2' | 'p3' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'hero' | string;
|
|
@@ -14,8 +15,8 @@ export interface TypographyProps extends Partial<TypographyDefaultProps>, AriaAt
|
|
|
14
15
|
fontSize?: ResolutionAwareProp<Property.Font>;
|
|
15
16
|
fontWeight?: Property.FontWeight;
|
|
16
17
|
hidden?: ResolutionAwareProp<boolean>;
|
|
17
|
-
horizontalMargin?: ResolutionAwareProp<
|
|
18
|
-
horizontalPadding?: ResolutionAwareProp<
|
|
18
|
+
horizontalMargin?: ResolutionAwareProp<BoxDimension>;
|
|
19
|
+
horizontalPadding?: ResolutionAwareProp<BoxDimension>;
|
|
19
20
|
htmlFor?: string;
|
|
20
21
|
htmlTag?: keyof HTMLElementTagNameMap;
|
|
21
22
|
htmlText?: string;
|
|
@@ -23,19 +24,19 @@ export interface TypographyProps extends Partial<TypographyDefaultProps>, AriaAt
|
|
|
23
24
|
justifySelf?: ResolutionAwareProp<Property.JustifySelf>;
|
|
24
25
|
letterSpacing?: ResolutionAwareProp<Property.LetterSpacing>;
|
|
25
26
|
lineHeight?: ResolutionAwareProp<Property.LineHeight>;
|
|
26
|
-
margin?: ResolutionAwareProp<
|
|
27
|
-
marginBottom?: ResolutionAwareProp<
|
|
28
|
-
marginLeft?: ResolutionAwareProp<
|
|
29
|
-
marginRight?: ResolutionAwareProp<
|
|
30
|
-
marginTop?: ResolutionAwareProp<
|
|
27
|
+
margin?: ResolutionAwareProp<BoxDimension>;
|
|
28
|
+
marginBottom?: ResolutionAwareProp<BoxDimension>;
|
|
29
|
+
marginLeft?: ResolutionAwareProp<BoxDimension>;
|
|
30
|
+
marginRight?: ResolutionAwareProp<BoxDimension>;
|
|
31
|
+
marginTop?: ResolutionAwareProp<BoxDimension>;
|
|
31
32
|
maxWidth?: ResolutionAwareProp<string>;
|
|
32
33
|
minWidth?: ResolutionAwareProp<string>;
|
|
33
34
|
onClick?: (event: any) => void;
|
|
34
|
-
padding?: ResolutionAwareProp<
|
|
35
|
-
paddingBottom?: ResolutionAwareProp<
|
|
36
|
-
paddingLeft?: ResolutionAwareProp<
|
|
37
|
-
paddingRight?: ResolutionAwareProp<
|
|
38
|
-
paddingTop?: ResolutionAwareProp<
|
|
35
|
+
padding?: ResolutionAwareProp<BoxDimension>;
|
|
36
|
+
paddingBottom?: ResolutionAwareProp<BoxDimension>;
|
|
37
|
+
paddingLeft?: ResolutionAwareProp<BoxDimension>;
|
|
38
|
+
paddingRight?: ResolutionAwareProp<BoxDimension>;
|
|
39
|
+
paddingTop?: ResolutionAwareProp<BoxDimension>;
|
|
39
40
|
style?: CSSProperties;
|
|
40
41
|
text?: string | number;
|
|
41
42
|
textShadow?: Property.TextShadow;
|
|
@@ -47,8 +48,8 @@ export interface TypographyProps extends Partial<TypographyDefaultProps>, AriaAt
|
|
|
47
48
|
* use `htmlTag` instead
|
|
48
49
|
* */
|
|
49
50
|
type?: keyof HTMLElementTagNameMap;
|
|
50
|
-
verticalMargin?: ResolutionAwareProp<
|
|
51
|
-
verticalPadding?: ResolutionAwareProp<
|
|
51
|
+
verticalMargin?: ResolutionAwareProp<BoxDimension>;
|
|
52
|
+
verticalPadding?: ResolutionAwareProp<BoxDimension>;
|
|
52
53
|
}
|
|
53
54
|
export interface TypographyDefaultProps {
|
|
54
55
|
color: TypographyColor;
|