@jobber/components 6.58.6 → 6.59.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/Menu/Menu.d.ts +5 -1
- package/dist/Menu-cjs.js +2 -2
- package/dist/Menu-es.js +2 -2
- package/dist/styles.css +1818 -1818
- package/package.json +2 -2
package/dist/Menu/Menu.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactElement } from "react";
|
|
2
|
-
import { IconNames } from "@jobber/design";
|
|
2
|
+
import { IconColorNames, IconNames } from "@jobber/design";
|
|
3
3
|
export interface MenuProps {
|
|
4
4
|
/**
|
|
5
5
|
* Custom menu activator. If this is not provided a default [… More] will be used.
|
|
@@ -34,6 +34,10 @@ export interface ActionProps {
|
|
|
34
34
|
* Visual cue for the action label
|
|
35
35
|
*/
|
|
36
36
|
readonly icon?: IconNames;
|
|
37
|
+
/**
|
|
38
|
+
* Color for the icon. Defaults to "icon".
|
|
39
|
+
*/
|
|
40
|
+
readonly iconColor?: IconColorNames;
|
|
37
41
|
/**
|
|
38
42
|
* Visual style for the action button
|
|
39
43
|
*/
|
package/dist/Menu-cjs.js
CHANGED
|
@@ -149,14 +149,14 @@ function SectionHeader({ text }) {
|
|
|
149
149
|
return (React.createElement("div", { className: styles.sectionHeader, "aria-hidden": true },
|
|
150
150
|
React.createElement(Typography.Typography, { element: "h6", size: "base", textColor: "textSecondary", fontWeight: "regular", textCase: "none" }, text)));
|
|
151
151
|
}
|
|
152
|
-
function Action({ label, sectionLabel, icon, destructive, onClick, }) {
|
|
152
|
+
function Action({ label, sectionLabel, icon, iconColor, destructive, onClick, }) {
|
|
153
153
|
const actionButtonRef = React.useRef();
|
|
154
154
|
const buttonClasses = classnames(styles.action, {
|
|
155
155
|
[styles.destructive]: destructive,
|
|
156
156
|
});
|
|
157
157
|
return (React.createElement("button", { role: "menuitem", type: "button", className: buttonClasses, key: label, onClick: onClick, ref: actionButtonRef },
|
|
158
158
|
icon && (React.createElement("div", null,
|
|
159
|
-
React.createElement(Icon.Icon, { color: destructive ? "destructive" :
|
|
159
|
+
React.createElement(Icon.Icon, { color: destructive ? "destructive" : iconColor, name: icon }))),
|
|
160
160
|
React.createElement(Typography.Typography, { element: "span", fontWeight: "semiBold", textColor: "text" },
|
|
161
161
|
sectionLabel && (React.createElement("span", { className: styles.screenReaderOnly }, sectionLabel)),
|
|
162
162
|
label)));
|
package/dist/Menu-es.js
CHANGED
|
@@ -147,14 +147,14 @@ function SectionHeader({ text }) {
|
|
|
147
147
|
return (React__default.createElement("div", { className: styles.sectionHeader, "aria-hidden": true },
|
|
148
148
|
React__default.createElement(Typography, { element: "h6", size: "base", textColor: "textSecondary", fontWeight: "regular", textCase: "none" }, text)));
|
|
149
149
|
}
|
|
150
|
-
function Action({ label, sectionLabel, icon, destructive, onClick, }) {
|
|
150
|
+
function Action({ label, sectionLabel, icon, iconColor, destructive, onClick, }) {
|
|
151
151
|
const actionButtonRef = useRef();
|
|
152
152
|
const buttonClasses = classnames(styles.action, {
|
|
153
153
|
[styles.destructive]: destructive,
|
|
154
154
|
});
|
|
155
155
|
return (React__default.createElement("button", { role: "menuitem", type: "button", className: buttonClasses, key: label, onClick: onClick, ref: actionButtonRef },
|
|
156
156
|
icon && (React__default.createElement("div", null,
|
|
157
|
-
React__default.createElement(Icon, { color: destructive ? "destructive" :
|
|
157
|
+
React__default.createElement(Icon, { color: destructive ? "destructive" : iconColor, name: icon }))),
|
|
158
158
|
React__default.createElement(Typography, { element: "span", fontWeight: "semiBold", textColor: "text" },
|
|
159
159
|
sectionLabel && (React__default.createElement("span", { className: styles.screenReaderOnly }, sectionLabel)),
|
|
160
160
|
label)));
|