@jobber/components 6.31.1 → 6.32.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/Heading/Heading.d.ts +14 -2
- package/dist/Heading-cjs.js +2 -2
- package/dist/Heading-es.js +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { TypographyOptions } from "../Typography";
|
|
2
|
+
import { TypographyOptions, TypographyProps } from "../Typography";
|
|
3
3
|
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
4
4
|
interface HeadingProps {
|
|
5
5
|
/**
|
|
@@ -11,7 +11,19 @@ interface HeadingProps {
|
|
|
11
11
|
* Allows overriding of the element rendered. Defaults to the heading specified with level.
|
|
12
12
|
*/
|
|
13
13
|
readonly element?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span";
|
|
14
|
+
/**
|
|
15
|
+
* **Use at your own risk:** Custom classNames for specific elements. This should only be used as a
|
|
16
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
17
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
18
|
+
*/
|
|
19
|
+
readonly UNSAFE_className?: TypographyProps["UNSAFE_className"];
|
|
20
|
+
/**
|
|
21
|
+
* **Use at your own risk:** Custom styles for specific elements. This should only be used as a
|
|
22
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
23
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
24
|
+
*/
|
|
25
|
+
readonly UNSAFE_style?: TypographyProps["UNSAFE_style"];
|
|
14
26
|
}
|
|
15
27
|
export type LevelMap = Record<HeadingLevel, TypographyOptions>;
|
|
16
|
-
export declare function Heading({ level, children, element }: HeadingProps): JSX.Element;
|
|
28
|
+
export declare function Heading({ level, children, element, UNSAFE_className, UNSAFE_style, }: HeadingProps): JSX.Element;
|
|
17
29
|
export {};
|
package/dist/Heading-cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var Typography = require('./Typography-cjs.js');
|
|
5
5
|
|
|
6
|
-
function Heading({ level = 5, children, element }) {
|
|
6
|
+
function Heading({ level = 5, children, element, UNSAFE_className, UNSAFE_style, }) {
|
|
7
7
|
const levelMap = {
|
|
8
8
|
1: {
|
|
9
9
|
element: "h1",
|
|
@@ -43,7 +43,7 @@ function Heading({ level = 5, children, element }) {
|
|
|
43
43
|
textColor: "heading",
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
|
-
return (React.createElement(Typography.Typography, Object.assign({}, levelMap[level], { element: element || levelMap[level].element }), children));
|
|
46
|
+
return (React.createElement(Typography.Typography, Object.assign({}, levelMap[level], { element: element || levelMap[level].element, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }), children));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
exports.Heading = Heading;
|
package/dist/Heading-es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { T as Typography } from './Typography-es.js';
|
|
3
3
|
|
|
4
|
-
function Heading({ level = 5, children, element }) {
|
|
4
|
+
function Heading({ level = 5, children, element, UNSAFE_className, UNSAFE_style, }) {
|
|
5
5
|
const levelMap = {
|
|
6
6
|
1: {
|
|
7
7
|
element: "h1",
|
|
@@ -41,7 +41,7 @@ function Heading({ level = 5, children, element }) {
|
|
|
41
41
|
textColor: "heading",
|
|
42
42
|
},
|
|
43
43
|
};
|
|
44
|
-
return (React__default.createElement(Typography, Object.assign({}, levelMap[level], { element: element || levelMap[level].element }), children));
|
|
44
|
+
return (React__default.createElement(Typography, Object.assign({}, levelMap[level], { element: element || levelMap[level].element, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }), children));
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
export { Heading as H };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.32.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -490,5 +490,5 @@
|
|
|
490
490
|
"> 1%",
|
|
491
491
|
"IE 10"
|
|
492
492
|
],
|
|
493
|
-
"gitHead": "
|
|
493
|
+
"gitHead": "8057aecd00ce2b6891b4b6e054d47f3b9125e8b1"
|
|
494
494
|
}
|