@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.
@@ -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;
@@ -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
- const Button = ({ text, onClick, disabled, LeftIcon, RightIcon, underline, backgroundColor, color, type = "button", }) => (_jsx("button", { type: type, onClick: onClick, disabled: disabled, children: _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, {})] }) }));
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
+ `;
@@ -10,6 +10,7 @@ type LinkButtonProps = {
10
10
  underline?: boolean;
11
11
  backgroundColor?: string;
12
12
  color?: string;
13
+ width?: string;
13
14
  };
14
15
  /**
15
16
  * A link that looks like a button
@@ -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, {})] }));
@@ -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;
@@ -6,6 +6,8 @@ export const BaseButton = styled.div `
6
6
  align-items: center;
7
7
  gap: 10px;
8
8
 
9
+ width: ${({ $width = "auto" }) => $width};
10
+
9
11
  padding: 10px 16px;
10
12
  border-radius: 4px;
11
13
 
@@ -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 `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grantbii/design-system",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "description": "Grantbii's Design System",
5
5
  "homepage": "https://design.grantbii.com",
6
6
  "repository": {