@vertigis/react-ui 19.7.0 → 19.7.1
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.
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import type { SvgIconProps as MuiSvgIconProps } from "@mui/material/SvgIcon";
|
|
1
2
|
import SvgIcon from "@mui/material/SvgIcon";
|
|
2
3
|
import type { ReactNode } from "react";
|
|
4
|
+
export interface SvgIconProps extends MuiSvgIconProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
3
7
|
/**
|
|
4
8
|
* Creates an SVG icon component from a <path>.
|
|
5
9
|
*
|
|
@@ -29,13 +29,13 @@ export default function createSvgIcon(path, displayName, mirror) {
|
|
|
29
29
|
// is RTL.
|
|
30
30
|
const RtlWrapper = (props, ref) => {
|
|
31
31
|
const { direction } = useTheme();
|
|
32
|
-
const { classes, className, ...otherProps } = props;
|
|
32
|
+
const { classes, className, title, titleAccess, ...otherProps } = props;
|
|
33
33
|
const { mirrored: mirroredClass, ...otherClasses } = mergeStyles(gcxSvgIconClasses, classes);
|
|
34
34
|
return (_jsx(StyledIcon, { classes: otherClasses, className: clsx(className, {
|
|
35
35
|
[mirroredClass]: direction === "rtl" &&
|
|
36
36
|
mirror !== false &&
|
|
37
37
|
(mirror ?? shouldMirror(displayName)),
|
|
38
|
-
}), ref: ref, ...otherProps }));
|
|
38
|
+
}), ref: ref, titleAccess: title ?? titleAccess, ...otherProps }));
|
|
39
39
|
};
|
|
40
40
|
// Copied from MUI implementation.
|
|
41
41
|
if (process.env.NODE_ENV !== "production") {
|