@unitedstatespowersquadrons/components 1.2.18-1 → 1.2.18-3
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/ActionButton.tsx +19 -8
- package/StripedTable/TableStyles.ts +4 -8
- package/package.json +1 -1
package/ActionButton.tsx
CHANGED
|
@@ -40,6 +40,7 @@ export interface CoreActionButtonProps extends FontAwesomeProps {
|
|
|
40
40
|
color: ButtonColorName;
|
|
41
41
|
grayMode?: boolean | undefined;
|
|
42
42
|
id?: string;
|
|
43
|
+
rightIcon?: boolean;
|
|
43
44
|
size?: "big" | "mediumWithMargin" | "medium" | "small" | undefined;
|
|
44
45
|
subtext?: string;
|
|
45
46
|
text: string;
|
|
@@ -63,7 +64,7 @@ export type ActionButtonProps =
|
|
|
63
64
|
| ActionButtonFormProps;
|
|
64
65
|
|
|
65
66
|
const ActionButton = (props: ActionButtonProps) => {
|
|
66
|
-
const { className, color, fa, grayMode, icon, id, mode, size, style, subtext, text, title } = props;
|
|
67
|
+
const { className, color, fa, grayMode, icon, id, mode, rightIcon, size, style, subtext, text, title } = props;
|
|
67
68
|
const classes = useStyles();
|
|
68
69
|
|
|
69
70
|
const colorClassName = classes[`${color}${grayMode ? "Gray" : "Colored"}`];
|
|
@@ -79,13 +80,23 @@ const ActionButton = (props: ActionButtonProps) => {
|
|
|
79
80
|
};
|
|
80
81
|
|
|
81
82
|
const buttonContents = () => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
if (rightIcon) {
|
|
84
|
+
return(
|
|
85
|
+
<>
|
|
86
|
+
<span>{text}</span>
|
|
87
|
+
{subtext && <small className={classes.subText}>({subtext})</small>}
|
|
88
|
+
<FontAwesomeIcon fa={fa} icon={icon} mode={mode} style={style} />
|
|
89
|
+
</>
|
|
90
|
+
);
|
|
91
|
+
} else {
|
|
92
|
+
return(
|
|
93
|
+
<>
|
|
94
|
+
<FontAwesomeIcon fa={fa} icon={icon} mode={mode} style={style} />
|
|
95
|
+
<span>{text}</span>
|
|
96
|
+
{subtext && <small className={classes.subText}>({subtext})</small>}
|
|
97
|
+
</>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
89
100
|
};
|
|
90
101
|
|
|
91
102
|
if ("onClick" in props) {
|
|
@@ -28,16 +28,12 @@ const tbody = {
|
|
|
28
28
|
|
|
29
29
|
const stripedTbody = {
|
|
30
30
|
"&:nth-child(even)": {
|
|
31
|
-
"& > td, & > th": {
|
|
32
|
-
|
|
33
|
-
height: "1.75em",
|
|
34
|
-
},
|
|
31
|
+
"& > td, & > th": { height: "1.75em" },
|
|
32
|
+
backgroundColor: Colors.shades._e,
|
|
35
33
|
},
|
|
36
34
|
"&:nth-child(odd)": {
|
|
37
|
-
"& > td, & > th": {
|
|
38
|
-
|
|
39
|
-
height: "1.75em",
|
|
40
|
-
},
|
|
35
|
+
"& > td, & > th": { height: "1.75em" },
|
|
36
|
+
backgroundColor: Colors.shades._d,
|
|
41
37
|
},
|
|
42
38
|
};
|
|
43
39
|
|