@unitedstatespowersquadrons/components 1.2.18-3 → 1.2.18-5
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 +7 -2
- package/package.json +1 -1
package/ActionButton.tsx
CHANGED
|
@@ -33,6 +33,10 @@ const useStyles = createUseStyles({
|
|
|
33
33
|
margin: "0 auto",
|
|
34
34
|
width: "fit-content",
|
|
35
35
|
},
|
|
36
|
+
wrapperLinkInline: {
|
|
37
|
+
display: "inline-block",
|
|
38
|
+
width: "fit-content",
|
|
39
|
+
},
|
|
36
40
|
});
|
|
37
41
|
|
|
38
42
|
export interface CoreActionButtonProps extends FontAwesomeProps {
|
|
@@ -40,6 +44,7 @@ export interface CoreActionButtonProps extends FontAwesomeProps {
|
|
|
40
44
|
color: ButtonColorName;
|
|
41
45
|
grayMode?: boolean | undefined;
|
|
42
46
|
id?: string;
|
|
47
|
+
inline?: boolean;
|
|
43
48
|
rightIcon?: boolean;
|
|
44
49
|
size?: "big" | "mediumWithMargin" | "medium" | "small" | undefined;
|
|
45
50
|
subtext?: string;
|
|
@@ -129,14 +134,14 @@ const ActionButton = (props: ActionButtonProps) => {
|
|
|
129
134
|
</BaseActionButton>
|
|
130
135
|
);
|
|
131
136
|
} else if ("href" in props) {
|
|
132
|
-
const { href, linkClassName } = props;
|
|
137
|
+
const { href, inline, linkClassName } = props;
|
|
133
138
|
|
|
134
139
|
return(
|
|
135
140
|
<BaseActionButton
|
|
136
141
|
className={classNames(classes.button, colorClassName, sizeClassName(), className)}
|
|
137
142
|
href={href}
|
|
138
143
|
id={id}
|
|
139
|
-
linkClassName={classNames(classes.wrapperLink, linkClassName)}
|
|
144
|
+
linkClassName={classNames(inline ? classes.wrapperLinkInline : classes.wrapperLink, linkClassName)}
|
|
140
145
|
title={title}
|
|
141
146
|
>
|
|
142
147
|
{buttonContents()}
|