@unitedstatespowersquadrons/components 1.4.3 → 1.4.4
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/Admin/AdminLink.tsx +19 -12
- package/package.json +1 -1
package/Admin/AdminLink.tsx
CHANGED
|
@@ -3,8 +3,7 @@ import { createUseStyles } from "react-jss";
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import AdminItem from "./AdminItem";
|
|
5
5
|
import Colors, { ButtonColorName } from "../Colors";
|
|
6
|
-
import { FontAwesomeProps } from "../FontAwesomeIcon";
|
|
7
|
-
import IconButton from "../IconButton";
|
|
6
|
+
import FontAwesomeIcon, { FontAwesomeProps } from "../FontAwesomeIcon";
|
|
8
7
|
import Styles from "../Styles";
|
|
9
8
|
|
|
10
9
|
// Styles aren't tree-shaken, but keeping every color variant here means apps
|
|
@@ -49,6 +48,13 @@ const useStyles = createUseStyles({
|
|
|
49
48
|
cursor: "pointer",
|
|
50
49
|
},
|
|
51
50
|
left: { textAlign: "left" },
|
|
51
|
+
link: {
|
|
52
|
+
...Styles.flexRow,
|
|
53
|
+
color: "inherit",
|
|
54
|
+
flex: 1,
|
|
55
|
+
justifyContent: "left",
|
|
56
|
+
textDecoration: "none",
|
|
57
|
+
},
|
|
52
58
|
orange: {
|
|
53
59
|
"& button": { ...Styles.orange },
|
|
54
60
|
"&:hover": {
|
|
@@ -96,22 +102,23 @@ interface Props extends FontAwesomeProps {
|
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
const AdminLink = (props: Props) => {
|
|
99
|
-
const { className, color, href, icon, mode, style, subMenu, title } = props;
|
|
105
|
+
const { className, color, fa, href, icon, mode, style, subMenu, title } = props;
|
|
100
106
|
const classes = useStyles();
|
|
101
107
|
|
|
102
108
|
const colorClassName = classes[color];
|
|
103
109
|
|
|
104
110
|
return(
|
|
105
111
|
<AdminItem className={classNames(classes.item, classes.left, colorClassName)}>
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
<a className={classes.link} href={href} title={title}>
|
|
113
|
+
<FontAwesomeIcon
|
|
114
|
+
css={classNames(classes.subMenuIcon, className)}
|
|
115
|
+
fa={fa}
|
|
116
|
+
icon={icon}
|
|
117
|
+
mode={mode}
|
|
118
|
+
style={style}
|
|
119
|
+
/>
|
|
120
|
+
<span className={classNames(classes.subMenuText, className)}>{subMenu}</span>
|
|
121
|
+
</a>
|
|
115
122
|
</AdminItem>
|
|
116
123
|
);
|
|
117
124
|
};
|