@grantbii/design-system 1.0.62 → 1.0.64
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/core/atoms/Button.d.ts +2 -1
- package/core/atoms/Button.js +6 -2
- package/core/atoms/LinkButton.d.ts +1 -0
- package/core/atoms/LinkButton.js +1 -1
- package/core/atoms/shared.d.ts +1 -0
- package/core/atoms/shared.js +2 -0
- package/core/organisms/GrantMatch.js +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/core/atoms/Button.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ type ButtonProps = {
|
|
|
10
10
|
underline?: boolean;
|
|
11
11
|
backgroundColor?: string;
|
|
12
12
|
color?: string;
|
|
13
|
+
width?: string;
|
|
13
14
|
};
|
|
14
|
-
declare const Button: ({ text, onClick, disabled, LeftIcon, RightIcon, underline, backgroundColor, color, type, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const Button: ({ text, onClick, disabled, LeftIcon, RightIcon, underline, backgroundColor, color, width, type, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export default Button;
|
package/core/atoms/Button.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { BaseButton } from "./shared";
|
|
3
|
-
|
|
2
|
+
import { BaseButton as ButtonContent } from "./shared";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
const Button = ({ text, onClick, disabled, LeftIcon, RightIcon, underline, backgroundColor, color, width, type = "button", }) => (_jsx(BaseButton, { type: type, onClick: onClick, disabled: disabled, "$width": width, children: _jsxs(ButtonContent, { "$underline": underline, "$backgroundColor": backgroundColor, "$color": color, "$width": width, children: [LeftIcon ? _jsx(LeftIcon, { color: color, size: 20 }) : _jsx(_Fragment, {}), _jsx("p", { children: text }), RightIcon ? _jsx(RightIcon, { color: color, size: 20 }) : _jsx(_Fragment, {})] }) }));
|
|
4
5
|
export default Button;
|
|
6
|
+
const BaseButton = styled.button `
|
|
7
|
+
width: ${({ $width = "auto" }) => $width};
|
|
8
|
+
`;
|
package/core/atoms/LinkButton.js
CHANGED
|
@@ -20,4 +20,4 @@ const LinkButton = (_a) => {
|
|
|
20
20
|
return disabled ? (_jsx(Content, Object.assign({}, contentProps))) : (_jsx(Link, { href: href, target: target, children: _jsx(Content, Object.assign({}, contentProps)) }));
|
|
21
21
|
};
|
|
22
22
|
export default LinkButton;
|
|
23
|
-
const Content = ({ text, LeftIcon, RightIcon, underline, backgroundColor, color, }) => (_jsxs(BaseButton, { "$underline": underline, "$backgroundColor": backgroundColor, "$color": color, children: [LeftIcon ? _jsx(LeftIcon, { color: color, size: 20 }) : _jsx(_Fragment, {}), _jsx("p", { children: text }), RightIcon ? _jsx(RightIcon, { color: color, size: 20 }) : _jsx(_Fragment, {})] }));
|
|
23
|
+
const Content = ({ text, LeftIcon, RightIcon, underline, backgroundColor, color, width, }) => (_jsxs(BaseButton, { "$underline": underline, "$backgroundColor": backgroundColor, "$color": color, "$width": width, children: [LeftIcon ? _jsx(LeftIcon, { color: color, size: 20 }) : _jsx(_Fragment, {}), _jsx("p", { children: text }), RightIcon ? _jsx(RightIcon, { color: color, size: 20 }) : _jsx(_Fragment, {})] }));
|
package/core/atoms/shared.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export declare const BaseButton: import("styled-components/dist/types").IStyledC
|
|
|
2
2
|
$underline?: boolean;
|
|
3
3
|
$backgroundColor?: string;
|
|
4
4
|
$color?: string;
|
|
5
|
+
$width?: string;
|
|
5
6
|
}>> & string;
|
|
6
7
|
export declare const LabelInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
package/core/atoms/shared.js
CHANGED
|
@@ -137,7 +137,7 @@ const FILE_TYPE_ICON_MAP = {
|
|
|
137
137
|
const GrantMatchModal = ({ activeQuery, updateActiveQuery, onClickCancel, isFullScreen, }) => {
|
|
138
138
|
const { files, uploadFiles, removeFile } = useFileDrop(activeQuery.files);
|
|
139
139
|
const [text, setText] = useState(activeQuery.text);
|
|
140
|
-
return (_jsx(Modal, { header: _jsx(Header, {}), content: _jsx(Content, { files: files, uploadFiles: uploadFiles, removeFile: removeFile, queryText: text, updateQueryText: (newText) => setText(newText) }), footer: _jsx(Button, { text: "Find My Grants", onClick: () => updateActiveQuery({ files, text }), backgroundColor: Colors.accent.yellow1 }), onClickCancel: onClickCancel, isFullScreen: isFullScreen, width: "480px" }));
|
|
140
|
+
return (_jsx(Modal, { header: _jsx(Header, {}), content: _jsx(Content, { files: files, uploadFiles: uploadFiles, removeFile: removeFile, queryText: text, updateQueryText: (newText) => setText(newText) }), footer: _jsx(Button, { text: "Find My Grants", onClick: () => updateActiveQuery({ files, text }), backgroundColor: Colors.accent.yellow1 }), onClickCancel: onClickCancel, isFullScreen: isFullScreen, width: "480px", height: "600px" }));
|
|
141
141
|
};
|
|
142
142
|
const Header = () => (_jsxs(BaseHeader, { children: [_jsx(Icons.GrantMatchIcon, { size: 24 }), _jsx("div", { children: "Grant Match" })] }));
|
|
143
143
|
const BaseHeader = styled.div `
|