@axa-fr/design-system-slash-react 1.1.1-alpha.142 → 1.1.1-alpha.145
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/Title/Title.d.ts +3 -1
- package/dist/Title/Title.js +6 -5
- package/package.json +2 -2
package/dist/Title/Title.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import "@axa-fr/design-system-slash-css/dist/Title/Title.scss";
|
|
2
|
-
import { ComponentPropsWithRef, PropsWithChildren } from "react";
|
|
2
|
+
import { ComponentPropsWithRef, PropsWithChildren, ReactElement } from "react";
|
|
3
3
|
type Headings = "h2" | "h3" | "h4";
|
|
4
4
|
type TitleProps = ComponentPropsWithRef<"h2"> & {
|
|
5
5
|
classModifier?: string;
|
|
6
6
|
heading?: Headings;
|
|
7
|
+
contentLeft?: ReactElement;
|
|
8
|
+
contentRight?: ReactElement;
|
|
7
9
|
};
|
|
8
10
|
export declare const Title: import("react").ForwardRefExoticComponent<Omit<PropsWithChildren<TitleProps>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
9
11
|
export {};
|
package/dist/Title/Title.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import "@axa-fr/design-system-slash-css/dist/Title/Title.scss";
|
|
3
|
-
import { forwardRef } from "react";
|
|
3
|
+
import { forwardRef, } from "react";
|
|
4
4
|
import { getComponentClassName } from "../utilities";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const baseClass = "af-title";
|
|
6
|
+
export const Title = forwardRef(({ className, classModifier, children, heading: Heading = "h2", contentLeft, contentRight, ...otherProps }, ref) => {
|
|
7
|
+
const componentClassName = getComponentClassName(className, classModifier, baseClass);
|
|
8
|
+
return (_jsxs("div", { className: `${baseClass}--container`, children: [_jsxs(Heading, { ref: ref, className: componentClassName, ...otherProps, children: [children, contentLeft] }), contentRight ? (_jsx("div", { className: "content-right", children: contentRight })) : null] }));
|
|
8
9
|
});
|
|
9
10
|
Title.displayName = "Title";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/design-system-slash-react",
|
|
3
|
-
"version": "1.1.1-alpha.
|
|
3
|
+
"version": "1.1.1-alpha.145",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://github.com/AxaFrance/design-system#readme",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@axa-fr/design-system-slash-css": "1.1.1-alpha.
|
|
50
|
+
"@axa-fr/design-system-slash-css": "1.1.1-alpha.145",
|
|
51
51
|
"@material-symbols/svg-400": ">= 0.19.0",
|
|
52
52
|
"react": ">= 18"
|
|
53
53
|
},
|