@grantbii/design-system 1.0.67 → 1.0.68
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/BrandLogo.d.ts +1 -3
- package/core/atoms/BrandLogo.js +14 -1
- package/core/organisms/GrantMatch.js +7 -4
- package/core/organisms/TallyModal.d.ts +0 -1
- package/package.json +1 -1
- package/stories/organisms/TallyModal.stories.d.ts +1 -3
- package/stories/organisms/TallyModal.stories.js +5 -9
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
type BrandLogoProps = {
|
|
2
|
-
width?: number;
|
|
3
|
-
height?: number;
|
|
4
2
|
isDarkTheme?: boolean;
|
|
5
3
|
alt?: string;
|
|
6
4
|
};
|
|
7
|
-
declare const BrandLogo: ({
|
|
5
|
+
declare const BrandLogo: ({ isDarkTheme, alt, }: BrandLogoProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
6
|
export default BrandLogo;
|
package/core/atoms/BrandLogo.js
CHANGED
|
@@ -3,5 +3,18 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import Image from "next/image";
|
|
4
4
|
import darkLogo from "../assets/logos/brand_logo-dark.webp";
|
|
5
5
|
import lightLogo from "../assets/logos/brand_logo-light.webp";
|
|
6
|
-
|
|
6
|
+
import styled from "styled-components";
|
|
7
|
+
import { Responsive } from "../foundations";
|
|
8
|
+
const BrandLogo = ({ isDarkTheme = true, alt = "Grantbii", }) => (_jsx(CustomImage, { src: isDarkTheme ? darkLogo : lightLogo, alt: alt, priority: true }));
|
|
7
9
|
export default BrandLogo;
|
|
10
|
+
const CustomImage = styled(Image) `
|
|
11
|
+
@media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
|
|
12
|
+
width: 125px;
|
|
13
|
+
height: 40px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
|
|
17
|
+
width: 150px;
|
|
18
|
+
height: 48px;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
@@ -8,11 +8,14 @@ import { Colors, Icons, Responsive, Typography } from "../foundations";
|
|
|
8
8
|
import { FileDrop, Modal, useFileDrop, useModal } from "../molecules";
|
|
9
9
|
const GrantMatch = ({ activeQuery, updateActiveQuery, removeActiveQueryFile, removeActiveQueryText, resetActiveQuery, }) => {
|
|
10
10
|
const { showModal, openModal, closeModal } = useModal();
|
|
11
|
-
const isActive = isGrantMatchActive(activeQuery);
|
|
12
11
|
const [queryText, setQueryText] = useState(activeQuery.text);
|
|
13
12
|
const updateQueryText = (newText) => setQueryText(newText);
|
|
14
13
|
const onClickSearch = () => updateActiveQuery(Object.assign(Object.assign({}, activeQuery), { text: queryText }));
|
|
15
|
-
|
|
14
|
+
const onClickReset = () => {
|
|
15
|
+
updateQueryText("");
|
|
16
|
+
resetActiveQuery();
|
|
17
|
+
};
|
|
18
|
+
return (_jsxs(BaseGrantMatch, { children: [_jsx(GrantMatchActions, { queryText: queryText, updateQueryText: updateQueryText, onClickSearch: onClickSearch, onClickFileDrop: () => openModal(), onClickReset: onClickReset, isActive: activeQuery.text !== "" }), activeQuery.files.length > 0 ? (_jsxs(ActiveQueryRow, { children: [_jsx(ActiveQueryFiles, { activeQuery: activeQuery, removeQueryFile: removeActiveQueryFile, removeQueryText: removeActiveQueryText }), _jsx(SmallScreenResetButton, { onClick: onClickReset })] })) : (_jsx(_Fragment, {})), showModal ? (_jsx(GrantMatchModal, { activeQuery: activeQuery, updateActiveQuery: updateActiveQuery, queryText: queryText, updateQueryText: updateQueryText, closeModal: closeModal })) : (_jsx(_Fragment, {}))] }));
|
|
16
19
|
};
|
|
17
20
|
export default GrantMatch;
|
|
18
21
|
// TODO: refactor
|
|
@@ -152,11 +155,11 @@ const SmallScreenReset = styled.div `
|
|
|
152
155
|
const BigScreenResetButton = ({ onClick }) => (_jsx(BigScreenReset, { children: _jsx(ResetButton, { onClick: onClick }) }));
|
|
153
156
|
const BigScreenReset = styled.div `
|
|
154
157
|
@media (width < ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
|
|
155
|
-
display:
|
|
158
|
+
display: none;
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
@media (width >= ${Responsive.WIDTH_BREAKPOINTS.laptop}) {
|
|
159
|
-
display:
|
|
162
|
+
display: inline;
|
|
160
163
|
}
|
|
161
164
|
`;
|
|
162
165
|
const ResetButton = ({ onClick }) => (_jsx(Button, { text: "Reset", onClick: onClick, color: Colors.typography.blackMedium, underline: true }));
|
|
@@ -3,7 +3,6 @@ type TallyModalProps = {
|
|
|
3
3
|
header?: ReactNode;
|
|
4
4
|
tallyId: string;
|
|
5
5
|
prefilledFieldsQueryParams?: string;
|
|
6
|
-
isFullScreen?: boolean;
|
|
7
6
|
onClickCancel: MouseEventHandler<HTMLButtonElement>;
|
|
8
7
|
};
|
|
9
8
|
declare const TallyModal: ({ tallyId, prefilledFieldsQueryParams, ...modalProps }: TallyModalProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -4,11 +4,9 @@ type TallyModalExampleProps = {
|
|
|
4
4
|
header?: ReactNode;
|
|
5
5
|
tallyId: string;
|
|
6
6
|
prefilledFieldsQueryParams?: string;
|
|
7
|
-
isFullScreen?: boolean;
|
|
8
7
|
};
|
|
9
8
|
declare const TallyModalExample: (props: TallyModalExampleProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
declare const meta: Meta<typeof TallyModalExample>;
|
|
11
10
|
export default meta;
|
|
12
11
|
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const FullScreen: Story;
|
|
12
|
+
export declare const Example: Story;
|
|
@@ -13,13 +13,9 @@ const meta = {
|
|
|
13
13
|
},
|
|
14
14
|
};
|
|
15
15
|
export default meta;
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
args: baseArgs,
|
|
22
|
-
};
|
|
23
|
-
export const FullScreen = {
|
|
24
|
-
args: Object.assign(Object.assign({}, baseArgs), { isFullScreen: true }),
|
|
16
|
+
export const Example = {
|
|
17
|
+
args: {
|
|
18
|
+
header: "Apply with us",
|
|
19
|
+
tallyId: "3jAj5Q",
|
|
20
|
+
},
|
|
25
21
|
};
|