@innovaccer/design-system 2.13.2 → 2.13.4-1
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/components/atoms/checkbox/__stories__/Alignment.story.jsx +11 -13
- package/core/components/atoms/dropdown/Dropdown.tsx +18 -2
- package/core/components/atoms/dropdown/DropdownList.tsx +47 -57
- package/core/components/atoms/dropdown/__stories__/LabelInline.story.jsx +58 -0
- package/core/components/atoms/dropdown/__stories__/{LabelPositionInDropdown.story.jsx → LabelOnTop.story.jsx} +8 -9
- package/core/components/atoms/dropdown/option/DefaultOption.tsx +1 -1
- package/core/components/atoms/dropdown/utility.tsx +6 -0
- package/core/components/atoms/icon/__stories__/variants/Image.story.jsx +3 -3
- package/core/components/css-utilities/Miscellaneous/Miscellaneous.story.tsx +4 -0
- package/core/components/molecules/dropzone/FileSelectorUtils.tsx +3 -0
- package/core/components/molecules/sidesheet/__stories__/variants/twoSteps.story.jsx +6 -4
- package/core/components/organisms/calendar/__stories__/index.story.jsx +4 -6
- package/core/components/organisms/dateRangePicker/__stories__/variants/withSingleInput.story.jsx +3 -0
- package/core/components/organisms/horizontalNav/__stories__/leftAlign.story.jsx +35 -19
- package/core/components/organisms/pageHeader/__stories__/Responsiveness.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withNavigation.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withNavigationL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withStepper.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withStepperL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withTabs.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/variants/withTabsL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withFilter.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withFilterL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withNavigation.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withNavigationL1.story.jsx +2 -2
- package/core/components/organisms/pageHeader/__stories__/withStepperL1.story.jsx +4 -4
- package/core/components/organisms/table/__stories__/TableAsDescriptionList.story.jsx +4 -4
- package/core/components/organisms/timePicker/TimePicker.tsx +6 -113
- package/core/components/organisms/timePicker/TimePickerWithInput.tsx +124 -0
- package/core/components/organisms/timePicker/TimePickerWithSearch.tsx +198 -0
- package/core/components/organisms/timePicker/__stories__/TimeIntervals.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/disabledOption.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/fromTo.story.jsx +72 -0
- package/core/components/organisms/timePicker/__stories__/showDuration.story.jsx +52 -0
- package/core/components/organisms/timePicker/__stories__/withDatePicker.story.jsx +88 -0
- package/core/components/organisms/timePicker/__stories__/{index.story.jsx → withInput.story.jsx} +6 -3
- package/core/components/organisms/timePicker/__stories__/withSearch.story.jsx +89 -0
- package/core/components/organisms/timePicker/__tests__/TimePickerWithSearch.test.tsx +486 -0
- package/core/components/organisms/timePicker/__tests__/__snapshots__/TimePickerWithSearch.test.tsx.snap +169 -0
- package/core/components/organisms/timePicker/index.tsx +2 -0
- package/core/components/organisms/timePicker/utility/searchUtils.tsx +295 -0
- package/core/components/organisms/timePicker/utility/timePickerUtility.tsx +219 -0
- package/core/components/organisms/timePicker/utils.tsx +1 -1
- package/core/index.tsx +1 -0
- package/css/dist/index.css +4 -10
- package/css/dist/index.css.map +1 -1
- package/css/src/components/dropdown.css +2 -6
- package/css/src/components/metricInput.css +1 -0
- package/css/src/components/modal.css +1 -2
- package/dist/core/components/atoms/dropdown/Dropdown.d.ts +2 -0
- package/dist/core/components/atoms/dropdown/DropdownList.d.ts +1 -0
- package/dist/core/components/atoms/dropdown/utility.d.ts +1 -0
- package/dist/core/components/atoms/popperWrapper/PopperWrapper.d.ts +22 -22
- package/dist/core/components/organisms/timePicker/TimePicker.d.ts +5 -13
- package/dist/core/components/organisms/timePicker/TimePickerWithInput.d.ts +24 -0
- package/dist/core/components/organisms/timePicker/TimePickerWithSearch.d.ts +32 -0
- package/dist/core/components/organisms/timePicker/index.d.ts +2 -0
- package/dist/core/components/organisms/timePicker/utility/searchUtils.d.ts +7 -0
- package/dist/core/components/organisms/timePicker/utility/timePickerUtility.d.ts +19 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/index.esm.js +709 -46
- package/dist/index.js +638 -68
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.br +0 -0
- package/dist/index.umd.js.gz +0 -0
- package/docs/.eslintrc.json +32 -1
- package/docs/.prettierrc +6 -0
- package/docs/README.md +14 -0
- package/docs/cypress/e2e/main.cy.js +35 -0
- package/docs/cypress/fixtures/example.json +5 -0
- package/docs/cypress/support/commands.ts +37 -0
- package/docs/cypress/support/e2e.ts +20 -0
- package/docs/cypress.config.js +9 -0
- package/docs/package.json +16 -2
- package/docs/src/components/Colors/Colors.js +13 -41
- package/docs/src/components/Container/ComponentsContainer.js +10 -30
- package/docs/src/components/Container/Container.js +10 -41
- package/docs/src/components/ErrorBoundary.js +9 -3
- package/docs/src/components/Footer/Footer.js +11 -10
- package/docs/src/components/GlobalSearch/index.js +47 -44
- package/docs/src/components/Header/Header.css +4 -0
- package/docs/src/components/Header/Header.js +25 -19
- package/docs/src/components/Layout.js +110 -172
- package/docs/src/components/LeftNav/LeftNav.js +12 -28
- package/docs/src/components/Logos/Logos.js +12 -26
- package/docs/src/components/MDXHeading.js +12 -18
- package/docs/src/components/Meta.js +9 -9
- package/docs/src/components/PropsTable/ArgJsDoc.tsx +2 -6
- package/docs/src/components/PropsTable/ArgRow.tsx +19 -47
- package/docs/src/components/PropsTable/ArgValue.tsx +50 -93
- package/docs/src/components/PropsTable/EmptyBlock.tsx +2 -5
- package/docs/src/components/PropsTable/SectionRow.tsx +7 -18
- package/docs/src/components/PropsTable/Table.tsx +43 -130
- package/docs/src/components/PropsTable/generateImports.tsx +1 -3
- package/docs/src/components/PropsTable/index.js +94 -140
- package/docs/src/components/PropsTable/prism.css +19 -20
- package/docs/src/components/Rules/DONTs.js +1 -6
- package/docs/src/components/Rules/DOs.js +1 -6
- package/docs/src/components/Rules/IconWrapper.js +6 -7
- package/docs/src/components/Rules/InlineMessage.js +1 -5
- package/docs/src/components/Rules/Rules.js +18 -28
- package/docs/src/components/TableOfContent/TableOfContent.js +49 -54
- package/docs/src/components/css/global.css +1 -1
- package/docs/src/components/css/prism.css +1 -1
- package/docs/src/components/css/style.css +7 -3
- package/docs/src/components/templates/Default.js +1 -1
- package/docs/src/components/templates/Homepage.js +4 -6
- package/docs/src/data/components/Overview.js +49 -56
- package/docs/src/data/components/images/Calendar.png +0 -0
- package/docs/src/data/components/images/MetaList.png +0 -0
- package/docs/src/data/components/images/PageHeader.png +0 -0
- package/docs/src/data/components/images/TimePicker.png +0 -0
- package/docs/src/data/components/images/mobile/Badge.png +0 -0
- package/docs/src/data/components/images/mobile/Dropdown.png +0 -0
- package/docs/src/data/components/images/mobile/Message.png +0 -0
- package/docs/src/data/components/images/mobile/MetaList.png +0 -0
- package/docs/src/data/components/images/mobile/Slider.png +0 -0
- package/docs/src/data/components/images/mobile/StatusHint.png +0 -0
- package/docs/src/data/components/images/mobile/Stepper.png +0 -0
- package/docs/src/data/components/index.js +168 -321
- package/docs/src/data/components/mobile.js +85 -125
- package/docs/src/data/components/overview.css +4 -2
- package/docs/src/data/components/patterns.js +25 -59
- package/docs/src/data/header-items.yaml +1 -0
- package/docs/src/data/nav/components.yaml +1 -7
- package/docs/src/pages/404.js +7 -17
- package/docs/src/pages/components/avatar/usage.mdx +1 -0
- package/docs/src/pages/components/button/usage.mdx +2 -2
- package/docs/src/pages/components/calendar/usage.mdx +3 -3
- package/docs/src/pages/components/chips/images/actionchip-state.png +0 -0
- package/docs/src/pages/components/chips/images/inputchips-state.png +0 -0
- package/docs/src/pages/components/chips/images/selectionchip-state.png +0 -0
- package/docs/src/pages/components/chips/usage.mdx +24 -2
- package/docs/src/pages/components/datePicker/images/datePicker-3.png +0 -0
- package/docs/src/pages/components/datePicker/images/datePicker-6.png +0 -0
- package/docs/src/pages/components/datePicker/usage.mdx +9 -2
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableField-2.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableField-3.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-1.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-4.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/usage.mdx +4 -4
- package/docs/src/pages/components/inputs/usage.mdx +7 -7
- package/docs/src/pages/components/tabs/images/tabs-1.png +0 -0
- package/docs/src/pages/content/button-guidelines/tabs/button-glossary.mdx +1776 -1
- package/docs/src/pages/content/button-guidelines/tabs/confusing-buttons.mdx +479 -8
- package/docs/src/pages/content/email-guidelines.mdx +3 -3
- package/docs/src/pages/content/house-rules/tabs/date,-time-&-numbers.mdx +24 -0
- package/docs/src/pages/content/house-rules/tabs/grammer.mdx +42 -2
- package/docs/src/pages/content/house-rules/tabs/punctuations.mdx +32 -0
- package/docs/src/pages/foundations/colors.mdx +338 -24
- package/docs/src/pages/foundations/layout/index.mdx +57 -82
- package/docs/src/pages/foundations/response-time.mdx +32 -77
- package/docs/src/pages/index.js +92 -121
- package/docs/src/pages/mobile/components/badges/images/badge-1.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-2.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-3.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-4.png +0 -0
- package/docs/src/pages/mobile/components/badges/images/badge-5.png +0 -0
- package/docs/src/pages/mobile/components/badges/usage.mdx +100 -0
- package/docs/src/pages/mobile/components/card/images/mcard-1.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-2.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-3.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-4.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-5.png +0 -0
- package/docs/src/pages/mobile/components/card/images/mcard-6.png +0 -0
- package/docs/src/pages/mobile/components/card/usage.mdx +54 -67
- package/docs/src/pages/mobile/components/checkbox/images/checkbox-1.png +0 -0
- package/docs/src/pages/mobile/components/checkbox/usage.mdx +26 -2
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-1.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-10.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-11.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-2.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-3.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-4.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-5.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-6.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-7.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-8.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/images/dropdown-9.png +0 -0
- package/docs/src/pages/mobile/components/dropdowns/usage.mdx +88 -0
- package/docs/src/pages/mobile/components/message/images/messages-1.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-10.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-11.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-12.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-2.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-3.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-4.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-5.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-6.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-7.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-8.png +0 -0
- package/docs/src/pages/mobile/components/message/images/messages-9.png +0 -0
- package/docs/src/pages/mobile/components/message/usage.mdx +170 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-1.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-2.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-3.png +0 -0
- package/docs/src/pages/mobile/components/metaList/images/metaList-4.png +0 -0
- package/docs/src/pages/mobile/components/metaList/usage.mdx +71 -0
- package/docs/src/pages/mobile/components/slider/images/slider-1.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-2.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-3.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-4.png +0 -0
- package/docs/src/pages/mobile/components/slider/images/slider-5.png +0 -0
- package/docs/src/pages/mobile/components/slider/usage.mdx +83 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-1.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-2.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-3.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-4.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-5.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-6.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/images/statushint-7.png +0 -0
- package/docs/src/pages/mobile/components/statusHint/usage.mdx +108 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-1.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-2.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-3.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-4.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-5.png +0 -0
- package/docs/src/pages/mobile/components/steppers/images/stepper-6.png +0 -0
- package/docs/src/pages/mobile/components/steppers/usage.mdx +111 -0
- package/docs/src/pages/mobile/foundations/layout/images/layout-2.png +0 -0
- package/docs/src/pages/mobile/foundations/layout/index.mdx +3 -1
- package/docs/src/pages/mobile/foundations/page-types/index.mdx +0 -214
- package/docs/src/pages/mobile/foundations/spacing/index.mdx +5 -0
- package/docs/src/pages/mobile/foundations/typography.mdx +1 -1
- package/docs/src/pages/patterns/uiStates/usage.mdx +92 -0
- package/docs/src/util/Frontmatter.js +4 -4
- package/docs/src/util/HeaderItems.js +2 -1
- package/docs/src/util/Helpers.js +3 -3
- package/docs/src/util/HomeIcons.js +91 -53
- package/docs/src/util/InPageNavItems.js +2 -6
- package/docs/src/util/Logos.js +2 -2
- package/docs/src/util/MdsChangelog.js +5 -10
- package/docs/src/util/MediumBlogs.js +13 -13
- package/docs/src/util/NavItems.js +14 -17
- package/docs/src/util/Search.js +2 -2
- package/docs/src/util/StorybookData.js +2 -4
- package/docs/src/util/constants.js +1 -5
- package/docs/src/util/context/NavContext.js +1 -4
- package/docs/src/util/hooks/useMetadata.js +1 -1
- package/package.json +1 -1
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-2.png +0 -0
- package/docs/src/pages/components/inlineEditableFields/images/inlineEditableFields-3.png +0 -0
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
/* eslint-disable import/no-unresolved */
|
|
2
1
|
import React, { useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
Row,
|
|
5
|
-
Column,
|
|
6
|
-
Button,
|
|
7
|
-
Toast,
|
|
8
|
-
Tooltip
|
|
9
|
-
} from '@innovaccer/design-system';
|
|
2
|
+
import { Row, Column, Button, Toast, Tooltip, Text } from '@innovaccer/design-system';
|
|
10
3
|
import LeftNav from './LeftNav';
|
|
11
4
|
import TableOfContent from './TableOfContent/TableOfContent';
|
|
12
5
|
import Header from './Header';
|
|
13
6
|
import Container from './Container';
|
|
14
7
|
import ComponentsContainer from './Container/ComponentsContainer';
|
|
15
|
-
import { MDXProvider } from
|
|
8
|
+
import { MDXProvider } from '@mdx-js/react';
|
|
16
9
|
import * as MDSComponents from '@innovaccer/design-system';
|
|
17
10
|
import Meta from './Meta';
|
|
18
11
|
import './css/style.css';
|
|
@@ -30,7 +23,7 @@ import { ArgsTable } from './PropsTable/Table';
|
|
|
30
23
|
import Markdown from 'markdown-to-jsx';
|
|
31
24
|
import { useFrontmatter } from '../util/Frontmatter';
|
|
32
25
|
import MDXHeading from './MDXHeading.js';
|
|
33
|
-
import { copyMessage, copyMessageSuccess } from
|
|
26
|
+
import { copyMessage, copyMessageSuccess } from '../util/constants.js';
|
|
34
27
|
import axios from 'axios';
|
|
35
28
|
|
|
36
29
|
const useGetStorybookData = async (name) => {
|
|
@@ -39,52 +32,40 @@ const useGetStorybookData = async (name) => {
|
|
|
39
32
|
|
|
40
33
|
// To handle Rich Text Editor Stories
|
|
41
34
|
if (name.startsWith('library')) {
|
|
42
|
-
componentPath = `/rte/${componentName}.json
|
|
35
|
+
componentPath = `/rte/${componentName}.json`;
|
|
43
36
|
}
|
|
44
37
|
|
|
45
|
-
const data = await axios.get(componentPath)
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
})
|
|
38
|
+
const data = await axios.get(componentPath).then(({ data = {} }) => {
|
|
39
|
+
if (!Object.keys(data).length) {
|
|
40
|
+
return Promise.reject(`Could not get details for id: ${componentName}`);
|
|
41
|
+
}
|
|
42
|
+
return data;
|
|
43
|
+
});
|
|
52
44
|
|
|
53
45
|
return data;
|
|
54
|
-
}
|
|
46
|
+
};
|
|
55
47
|
|
|
56
48
|
function getJsxCode(name) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
? componentData.parameters.docs.docPage?.customCode ||
|
|
62
|
-
componentData.parameters.storySource?.source
|
|
49
|
+
return useGetStorybookData(name).then((componentData) => {
|
|
50
|
+
const jsxCode =
|
|
51
|
+
componentData && componentData.parameters
|
|
52
|
+
? componentData.parameters.docs.docPage?.customCode || componentData.parameters.storySource?.source
|
|
63
53
|
: '';
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
})
|
|
54
|
+
return jsxCode;
|
|
55
|
+
});
|
|
67
56
|
}
|
|
68
57
|
|
|
69
58
|
function getPropTableData(name) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const jsxCode = componentData
|
|
75
|
-
? componentData.parameters.argTypes
|
|
76
|
-
: '';
|
|
77
|
-
return jsxCode;
|
|
78
|
-
|
|
79
|
-
})
|
|
59
|
+
return useGetStorybookData(name).then((componentData) => {
|
|
60
|
+
const jsxCode = componentData ? componentData.parameters.argTypes : '';
|
|
61
|
+
return jsxCode;
|
|
62
|
+
});
|
|
80
63
|
}
|
|
81
64
|
|
|
82
65
|
const Preview = ({ name }) => {
|
|
83
66
|
return (
|
|
84
67
|
<div>
|
|
85
|
-
<PropsTable
|
|
86
|
-
dataProvider={() => getJsxCode(name)}
|
|
87
|
-
/>
|
|
68
|
+
<PropsTable dataProvider={() => getJsxCode(name)} />
|
|
88
69
|
</div>
|
|
89
70
|
);
|
|
90
71
|
};
|
|
@@ -97,7 +78,6 @@ const A11yBlock = ({ name }) => {
|
|
|
97
78
|
React.useEffect(() => {
|
|
98
79
|
useGetStorybookData(name)
|
|
99
80
|
.then((componentData) => {
|
|
100
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
101
81
|
const a11yProps = componentData && componentData.parameters.docs.docPage?.a11yProps;
|
|
102
82
|
|
|
103
83
|
setData(a11yProps);
|
|
@@ -110,32 +90,30 @@ const A11yBlock = ({ name }) => {
|
|
|
110
90
|
}, []);
|
|
111
91
|
|
|
112
92
|
if (loading) {
|
|
113
|
-
return <div>
|
|
114
|
-
Loading ...
|
|
115
|
-
</div>
|
|
93
|
+
return <div>Loading ...</div>;
|
|
116
94
|
}
|
|
117
95
|
|
|
118
96
|
if (error) {
|
|
119
|
-
return
|
|
97
|
+
return (
|
|
98
|
+
<MDSComponents.Message
|
|
99
|
+
className="my-7"
|
|
100
|
+
appearance="alert"
|
|
101
|
+
title={error}
|
|
102
|
+
description="Hold tight, we are working to get it up for you to interact with."
|
|
103
|
+
/>
|
|
104
|
+
);
|
|
120
105
|
}
|
|
121
|
-
return
|
|
122
|
-
|
|
123
|
-
{data && <Markdown className="A11y-markdown">{data}</Markdown>}
|
|
124
|
-
</div>
|
|
125
|
-
);
|
|
126
|
-
}
|
|
106
|
+
return <div className="mb-8">{data && <Markdown className="A11y-markdown">{data}</Markdown>}</div>;
|
|
107
|
+
};
|
|
127
108
|
|
|
128
109
|
const FrameWrapper = ({ componentName }) => {
|
|
129
|
-
|
|
130
110
|
const onLoad = () => {
|
|
131
111
|
document.getElementById('iframe-loader').style.display = 'none';
|
|
132
112
|
};
|
|
133
113
|
|
|
134
114
|
return (
|
|
135
115
|
<>
|
|
136
|
-
<div id="iframe-loader">
|
|
137
|
-
Loading ...
|
|
138
|
-
</div>
|
|
116
|
+
<div id="iframe-loader">Loading ...</div>
|
|
139
117
|
<iframe
|
|
140
118
|
id="myFrame"
|
|
141
119
|
width="100%"
|
|
@@ -143,14 +121,13 @@ const FrameWrapper = ({ componentName }) => {
|
|
|
143
121
|
scrolling="no"
|
|
144
122
|
frameBorder="0"
|
|
145
123
|
onLoad={onLoad}
|
|
146
|
-
src={`https://mds
|
|
124
|
+
src={`https://mds.innovaccer.com/iframe.html?id=${componentName}&viewMode=docs&panel=true&nav=false&addons=1&stories=0&embed=prop-table`}
|
|
147
125
|
/>
|
|
148
126
|
</>
|
|
149
127
|
);
|
|
150
|
-
}
|
|
128
|
+
};
|
|
151
129
|
|
|
152
130
|
const PreviewWithPropTable = ({ name, embed }) => {
|
|
153
|
-
|
|
154
131
|
const [data, setData] = React.useState({});
|
|
155
132
|
const [loading, setLoading] = React.useState(true);
|
|
156
133
|
const [error, setError] = React.useState(null);
|
|
@@ -170,47 +147,36 @@ const PreviewWithPropTable = ({ name, embed }) => {
|
|
|
170
147
|
}, []);
|
|
171
148
|
|
|
172
149
|
if (loading && !embed) {
|
|
173
|
-
return <div> Loading ... </div
|
|
150
|
+
return <div> Loading ... </div>;
|
|
174
151
|
}
|
|
175
152
|
|
|
176
153
|
if (error) {
|
|
177
|
-
return
|
|
154
|
+
return (
|
|
155
|
+
<MDSComponents.Message
|
|
156
|
+
className="my-7"
|
|
157
|
+
appearance="alert"
|
|
158
|
+
title={error}
|
|
159
|
+
description="Hold tight, we are working to get it up for you to interact with."
|
|
160
|
+
/>
|
|
161
|
+
);
|
|
178
162
|
}
|
|
179
163
|
|
|
180
164
|
return (
|
|
181
|
-
<div className="overflow-x-scroll">
|
|
182
|
-
{embed ?
|
|
183
|
-
<FrameWrapper componentName={name} />
|
|
184
|
-
:
|
|
185
|
-
<ArgsTable rows={data} />
|
|
186
|
-
}
|
|
187
|
-
</div>
|
|
165
|
+
<div className="overflow-x-scroll">{embed ? <FrameWrapper componentName={name} /> : <ArgsTable rows={data} />}</div>
|
|
188
166
|
);
|
|
189
167
|
};
|
|
190
168
|
|
|
191
169
|
const List = ({ children, ...rest }) => {
|
|
192
|
-
return
|
|
193
|
-
|
|
194
|
-
{children}
|
|
195
|
-
</div>
|
|
196
|
-
)
|
|
197
|
-
}
|
|
170
|
+
return <div className="list">{children}</div>;
|
|
171
|
+
};
|
|
198
172
|
const leftMenuList = [
|
|
199
173
|
{
|
|
200
|
-
title: 'Masala Design System'
|
|
201
|
-
}
|
|
174
|
+
title: 'Masala Design System',
|
|
175
|
+
},
|
|
202
176
|
];
|
|
203
177
|
|
|
204
178
|
const ComponentsPage = (props) => {
|
|
205
|
-
const {
|
|
206
|
-
tabs,
|
|
207
|
-
children,
|
|
208
|
-
pageTitle,
|
|
209
|
-
frontmatter,
|
|
210
|
-
DSComponents,
|
|
211
|
-
relativePagePath,
|
|
212
|
-
pageDescription
|
|
213
|
-
} = props;
|
|
179
|
+
const { tabs, children, pageTitle, frontmatter, DSComponents, relativePagePath, pageDescription } = props;
|
|
214
180
|
|
|
215
181
|
return (
|
|
216
182
|
<ComponentsContainer
|
|
@@ -220,24 +186,13 @@ const ComponentsPage = (props) => {
|
|
|
220
186
|
pageDescription={pageDescription}
|
|
221
187
|
frontmatter={frontmatter}
|
|
222
188
|
>
|
|
223
|
-
<MDXProvider components={DSComponents}>
|
|
224
|
-
{children}
|
|
225
|
-
</MDXProvider>
|
|
189
|
+
<MDXProvider components={DSComponents}>{children}</MDXProvider>
|
|
226
190
|
</ComponentsContainer>
|
|
227
|
-
)
|
|
228
|
-
}
|
|
191
|
+
);
|
|
192
|
+
};
|
|
229
193
|
|
|
230
194
|
const MDXPage = (props) => {
|
|
231
|
-
const {
|
|
232
|
-
tabs,
|
|
233
|
-
children,
|
|
234
|
-
pageTitle,
|
|
235
|
-
frontmatter,
|
|
236
|
-
DSComponents,
|
|
237
|
-
relativePagePath,
|
|
238
|
-
pageDescription,
|
|
239
|
-
logos
|
|
240
|
-
} = props;
|
|
195
|
+
const { tabs, children, pageTitle, frontmatter, DSComponents, relativePagePath, pageDescription, logos } = props;
|
|
241
196
|
|
|
242
197
|
return (
|
|
243
198
|
<Container
|
|
@@ -248,47 +203,31 @@ const MDXPage = (props) => {
|
|
|
248
203
|
logos={logos}
|
|
249
204
|
frontmatter={frontmatter}
|
|
250
205
|
>
|
|
251
|
-
<MDXProvider components={DSComponents}>
|
|
252
|
-
{children}
|
|
253
|
-
</MDXProvider>
|
|
206
|
+
<MDXProvider components={DSComponents}>{children}</MDXProvider>
|
|
254
207
|
</Container>
|
|
255
|
-
)
|
|
256
|
-
}
|
|
208
|
+
);
|
|
209
|
+
};
|
|
257
210
|
|
|
258
211
|
const OverviewContainer = (props) => {
|
|
259
212
|
return (
|
|
260
|
-
<Row className=
|
|
213
|
+
<Row className="justify-content-center">
|
|
261
214
|
<Column className="px-11 py-8 min-vh-100 overview-container" size={12}>
|
|
262
215
|
<ComponentsPage {...props} />
|
|
263
216
|
</Column>
|
|
264
217
|
</Row>
|
|
265
|
-
)
|
|
266
|
-
}
|
|
218
|
+
);
|
|
219
|
+
};
|
|
267
220
|
|
|
268
221
|
const MarkdownContainer = (props) => {
|
|
269
|
-
const {
|
|
270
|
-
relativePagePath,
|
|
271
|
-
is404,
|
|
272
|
-
pageTitle,
|
|
273
|
-
location
|
|
274
|
-
} = props;
|
|
222
|
+
const { relativePagePath, is404, pageTitle, location } = props;
|
|
275
223
|
|
|
276
224
|
return (
|
|
277
|
-
<Row className=
|
|
225
|
+
<Row className="justify-content-center">
|
|
278
226
|
<Column className="px-11 py-8 min-vh-100 inner-left-container" size={9}>
|
|
279
|
-
{
|
|
280
|
-
!relativePagePath.includes('components') ?
|
|
281
|
-
<MDXPage {...props} />
|
|
282
|
-
:
|
|
283
|
-
<ComponentsPage {...props} />
|
|
284
|
-
}
|
|
227
|
+
{!relativePagePath.includes('components') ? <MDXPage {...props} /> : <ComponentsPage {...props} />}
|
|
285
228
|
</Column>
|
|
286
229
|
|
|
287
|
-
<Column
|
|
288
|
-
size={3}
|
|
289
|
-
className="pb-6 in-page-nav position-sticky scroll-y"
|
|
290
|
-
style={{ height: 'calc(100vh - 48px)' }}
|
|
291
|
-
>
|
|
230
|
+
<Column size={3} className="pb-6 in-page-nav position-sticky scroll-y" style={{ height: 'calc(100vh - 48px)' }}>
|
|
292
231
|
<TableOfContent
|
|
293
232
|
is404Page={is404}
|
|
294
233
|
relativePagePath={relativePagePath}
|
|
@@ -297,8 +236,16 @@ const MarkdownContainer = (props) => {
|
|
|
297
236
|
/>
|
|
298
237
|
</Column>
|
|
299
238
|
</Row>
|
|
300
|
-
)
|
|
301
|
-
}
|
|
239
|
+
);
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
const Caption = ({ children }) => {
|
|
243
|
+
return (
|
|
244
|
+
<Text size="small" appearance="subtle" className="d-flex mt-4 justify-content-center text-align--center">
|
|
245
|
+
{children}
|
|
246
|
+
</Text>
|
|
247
|
+
);
|
|
248
|
+
};
|
|
302
249
|
|
|
303
250
|
const Layout = ({
|
|
304
251
|
children,
|
|
@@ -315,19 +262,18 @@ const Layout = ({
|
|
|
315
262
|
}) => {
|
|
316
263
|
const is404 = children && children.key === null;
|
|
317
264
|
const [isToastActive, setIsToastActive] = useState(false);
|
|
318
|
-
const [codeCopyText, setCodeCopyText] = useState('')
|
|
265
|
+
const [codeCopyText, setCodeCopyText] = useState('');
|
|
319
266
|
const [toastTitle, setToastTitle] = useState('');
|
|
320
|
-
const [isTooltipActiveCode, setTooltipActiveCode] = useState(false)
|
|
267
|
+
const [isTooltipActiveCode, setTooltipActiveCode] = useState(false);
|
|
321
268
|
const [tooltipName, setTooltipName] = useState(copyMessage);
|
|
322
269
|
const frontmatter = useFrontmatter(relativePagePath);
|
|
323
270
|
const refCode = React.createRef();
|
|
324
271
|
const isOverviewPage = relativePagePath.includes('overview');
|
|
325
272
|
|
|
326
273
|
const copyToClipboard = (str) => {
|
|
327
|
-
if (typeof
|
|
274
|
+
if (typeof str === 'string') {
|
|
328
275
|
navigator.clipboard.writeText(str);
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
276
|
+
} else {
|
|
331
277
|
let codeBlock = '';
|
|
332
278
|
if (Object.keys(str).length > 0) {
|
|
333
279
|
const element = str.props.children;
|
|
@@ -344,7 +290,7 @@ const Layout = ({
|
|
|
344
290
|
}
|
|
345
291
|
}
|
|
346
292
|
navigator.clipboard.writeText(codeBlock);
|
|
347
|
-
setCodeCopyText(str)
|
|
293
|
+
setCodeCopyText(str);
|
|
348
294
|
}
|
|
349
295
|
};
|
|
350
296
|
|
|
@@ -353,8 +299,11 @@ const Layout = ({
|
|
|
353
299
|
<>
|
|
354
300
|
<div {...rest}>{children}</div>
|
|
355
301
|
<div
|
|
356
|
-
onMouseLeave={() => {
|
|
357
|
-
|
|
302
|
+
onMouseLeave={() => {
|
|
303
|
+
setTooltipName(copyMessage);
|
|
304
|
+
setTooltipActiveCode(false);
|
|
305
|
+
}}
|
|
306
|
+
className="ml-auto"
|
|
358
307
|
>
|
|
359
308
|
<Tooltip
|
|
360
309
|
open={children === codeCopyText ? isTooltipActiveCode : false}
|
|
@@ -364,9 +313,12 @@ const Layout = ({
|
|
|
364
313
|
boundaryElement={refCode}
|
|
365
314
|
>
|
|
366
315
|
<Button
|
|
367
|
-
icon=
|
|
368
|
-
className=
|
|
369
|
-
onClick={() => {
|
|
316
|
+
icon="copy"
|
|
317
|
+
className="p-0"
|
|
318
|
+
onClick={() => {
|
|
319
|
+
copyToClipboard(children);
|
|
320
|
+
toggleTooltip(copyMessageSuccess, 'code');
|
|
321
|
+
}}
|
|
370
322
|
/>
|
|
371
323
|
</Tooltip>
|
|
372
324
|
</div>
|
|
@@ -378,37 +330,25 @@ const Layout = ({
|
|
|
378
330
|
setIsToastActive(true);
|
|
379
331
|
setToastTitle(name);
|
|
380
332
|
setTimeout(() => setIsToastActive(false), 1500);
|
|
381
|
-
}
|
|
333
|
+
};
|
|
382
334
|
|
|
383
335
|
const toggleTooltip = (name, type) => {
|
|
384
|
-
if (type ===
|
|
385
|
-
setTooltipActiveCode(true)
|
|
336
|
+
if (type === 'code') {
|
|
337
|
+
setTooltipActiveCode(true);
|
|
386
338
|
}
|
|
387
339
|
setTooltipName(name);
|
|
388
|
-
}
|
|
340
|
+
};
|
|
389
341
|
|
|
390
342
|
const Logos = ({ children, logoData, ...rest }) => {
|
|
391
|
-
return
|
|
392
|
-
<ProductLogos
|
|
393
|
-
logoData={logoData}
|
|
394
|
-
toggleToast={toggleToast}
|
|
395
|
-
/>
|
|
396
|
-
);
|
|
343
|
+
return <ProductLogos logoData={logoData} toggleToast={toggleToast} />;
|
|
397
344
|
};
|
|
398
345
|
|
|
399
346
|
const Rectangle = ({ name, ...rest }) => {
|
|
400
|
-
return
|
|
401
|
-
<div className='rectangle'>{name}</div>
|
|
402
|
-
);
|
|
347
|
+
return <div className="rectangle">{name}</div>;
|
|
403
348
|
};
|
|
404
349
|
|
|
405
350
|
const Colors = ({ children, colorData, ...rest }) => {
|
|
406
|
-
return
|
|
407
|
-
<ProductColors
|
|
408
|
-
colorData={colorData}
|
|
409
|
-
toggleToast={toggleToast}
|
|
410
|
-
/>
|
|
411
|
-
);
|
|
351
|
+
return <ProductColors colorData={colorData} toggleToast={toggleToast} />;
|
|
412
352
|
};
|
|
413
353
|
|
|
414
354
|
const DSComponents = {
|
|
@@ -422,9 +362,10 @@ const Layout = ({
|
|
|
422
362
|
DONTs,
|
|
423
363
|
InlineMessage,
|
|
424
364
|
IconWrapper,
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
365
|
+
Caption,
|
|
366
|
+
h1: (props) => <MDXHeading size="xxl" headingInfo={props} />,
|
|
367
|
+
h2: (props) => <MDXHeading size="xl" headingInfo={props} />,
|
|
368
|
+
h3: (props) => <MDXHeading size="l" headingInfo={props} />,
|
|
428
369
|
h4: (props) => <MDXHeading size="m" headingInfo={props} />,
|
|
429
370
|
h5: (props) => <MDXHeading size="s" headingInfo={props} />,
|
|
430
371
|
ul: List,
|
|
@@ -436,7 +377,7 @@ const Layout = ({
|
|
|
436
377
|
const showAnimation = () => {
|
|
437
378
|
if (location.state?.animation === false) return false;
|
|
438
379
|
return true;
|
|
439
|
-
}
|
|
380
|
+
};
|
|
440
381
|
|
|
441
382
|
return (
|
|
442
383
|
<>
|
|
@@ -448,10 +389,7 @@ const Layout = ({
|
|
|
448
389
|
frontmatter={frontmatter}
|
|
449
390
|
relativePagePath={relativePagePath}
|
|
450
391
|
/>
|
|
451
|
-
<Header
|
|
452
|
-
leftMenuList={leftMenuList}
|
|
453
|
-
relativePagePath={relativePagePath}
|
|
454
|
-
/>
|
|
392
|
+
<Header leftMenuList={leftMenuList} relativePagePath={relativePagePath} />
|
|
455
393
|
<Row style={{ height: 'calc(100vh - 48px)' }} ref={refCode}>
|
|
456
394
|
<LeftNav
|
|
457
395
|
is404Page={is404}
|
|
@@ -460,8 +398,8 @@ const Layout = ({
|
|
|
460
398
|
showMobile={showMobile}
|
|
461
399
|
frontmatter={frontmatter}
|
|
462
400
|
/>
|
|
463
|
-
<Column className={`${showAnimation() ?
|
|
464
|
-
{!isOverviewPage ?
|
|
401
|
+
<Column className={`${showAnimation() ? 'page-animation' : ''} page-scroll h-100`} id="main-container">
|
|
402
|
+
{!isOverviewPage ? (
|
|
465
403
|
<MarkdownContainer
|
|
466
404
|
relativePagePath={relativePagePath}
|
|
467
405
|
is404={is404}
|
|
@@ -474,7 +412,7 @@ const Layout = ({
|
|
|
474
412
|
pageDescription={pageDescription}
|
|
475
413
|
logos={logos}
|
|
476
414
|
/>
|
|
477
|
-
|
|
415
|
+
) : (
|
|
478
416
|
<OverviewContainer
|
|
479
417
|
tabs={tabs}
|
|
480
418
|
children={children}
|
|
@@ -484,12 +422,12 @@ const Layout = ({
|
|
|
484
422
|
relativePagePath={relativePagePath}
|
|
485
423
|
pageDescription={pageDescription}
|
|
486
424
|
/>
|
|
487
|
-
}
|
|
425
|
+
)}
|
|
488
426
|
{isToastActive && (
|
|
489
427
|
<Toast
|
|
490
|
-
appearance=
|
|
428
|
+
appearance="success"
|
|
491
429
|
title={toastTitle}
|
|
492
|
-
className=
|
|
430
|
+
className="position-fixed ml-5 toast"
|
|
493
431
|
onClose={() => setIsToastActive(false)}
|
|
494
432
|
/>
|
|
495
433
|
)}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { useNavItems } from '../../util/NavItems';
|
|
3
|
-
import {
|
|
4
|
-
VerticalNav,
|
|
5
|
-
Subheading,
|
|
6
|
-
Button,
|
|
7
|
-
} from '@innovaccer/design-system';
|
|
3
|
+
import { VerticalNav, Subheading, Button } from '@innovaccer/design-system';
|
|
8
4
|
import { navigate } from 'gatsby';
|
|
9
5
|
import { MOBILE } from '../../util/constants';
|
|
10
6
|
|
|
@@ -42,7 +38,7 @@ const LeftNav = (props) => {
|
|
|
42
38
|
|
|
43
39
|
useEffect(() => {
|
|
44
40
|
const active = isBrowser ? getActiveNavItem() : '';
|
|
45
|
-
const obj = { link: active }
|
|
41
|
+
const obj = { link: active };
|
|
46
42
|
setActive(obj);
|
|
47
43
|
|
|
48
44
|
const ele = document.getElementById('navbar-container');
|
|
@@ -52,7 +48,6 @@ const LeftNav = (props) => {
|
|
|
52
48
|
|
|
53
49
|
ele.addEventListener('scroll', setPosition(ele.scrollTop));
|
|
54
50
|
return () => ele.removeEventListener('scroll', setPosition(ele.scrollTop));
|
|
55
|
-
|
|
56
51
|
}, []);
|
|
57
52
|
|
|
58
53
|
const onClickHandler = (menu) => {
|
|
@@ -65,9 +60,7 @@ const LeftNav = (props) => {
|
|
|
65
60
|
navigate(`/mobile${window.location.pathname}`);
|
|
66
61
|
} else {
|
|
67
62
|
if (window.location.pathname.includes('/mobile')) {
|
|
68
|
-
navigate(
|
|
69
|
-
window.location.pathname.replace('/mobile', '')
|
|
70
|
-
);
|
|
63
|
+
navigate(window.location.pathname.replace('/mobile', ''));
|
|
71
64
|
}
|
|
72
65
|
}
|
|
73
66
|
};
|
|
@@ -83,16 +76,13 @@ const LeftNav = (props) => {
|
|
|
83
76
|
};
|
|
84
77
|
|
|
85
78
|
return (
|
|
86
|
-
<div
|
|
87
|
-
id="navbar-container"
|
|
88
|
-
className='h-100 bg-secondary-lightest border-right page-scroll'
|
|
89
|
-
>
|
|
79
|
+
<div id="navbar-container" className="h-100 bg-secondary-lightest border-right page-scroll">
|
|
90
80
|
{showMenuButtons && (
|
|
91
|
-
<div className=
|
|
81
|
+
<div className="d-flex pt-6 pl-6">
|
|
92
82
|
<Button
|
|
93
|
-
appearance=
|
|
94
|
-
size=
|
|
95
|
-
className=
|
|
83
|
+
appearance="basic"
|
|
84
|
+
size="regular"
|
|
85
|
+
className="mr-4"
|
|
96
86
|
onClick={() => handleNavigate()}
|
|
97
87
|
selected={!relativePagePath.includes(MOBILE)}
|
|
98
88
|
expanded={true}
|
|
@@ -100,26 +90,20 @@ const LeftNav = (props) => {
|
|
|
100
90
|
Web
|
|
101
91
|
</Button>
|
|
102
92
|
<Button
|
|
103
|
-
appearance=
|
|
93
|
+
appearance="basic"
|
|
104
94
|
onClick={() => handleNavigate(MOBILE)}
|
|
105
95
|
selected={relativePagePath.includes(MOBILE)}
|
|
106
|
-
className=
|
|
96
|
+
className="mr-6"
|
|
107
97
|
expanded={true}
|
|
108
98
|
>
|
|
109
99
|
Mobile
|
|
110
100
|
</Button>
|
|
111
101
|
</div>
|
|
112
102
|
)}
|
|
113
|
-
<Subheading className=
|
|
103
|
+
<Subheading className="pl-6 pt-6 pb-3" appearance="subtle">
|
|
114
104
|
{getHeading()}
|
|
115
105
|
</Subheading>
|
|
116
|
-
<VerticalNav
|
|
117
|
-
menus={navItems}
|
|
118
|
-
active={active}
|
|
119
|
-
onClick={onClickHandler}
|
|
120
|
-
expanded={true}
|
|
121
|
-
autoCollapse={false}
|
|
122
|
-
/>
|
|
106
|
+
<VerticalNav menus={navItems} active={active} onClick={onClickHandler} expanded={true} autoCollapse={false} />
|
|
123
107
|
</div>
|
|
124
108
|
);
|
|
125
109
|
};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Card,
|
|
4
|
-
Column,
|
|
5
|
-
Icon,
|
|
6
|
-
Toast,
|
|
7
|
-
} from '@innovaccer/design-system';
|
|
2
|
+
import { Card, Column, Icon, Toast } from '@innovaccer/design-system';
|
|
8
3
|
import './Logos.css';
|
|
9
4
|
import { GatsbyImage, getImage } from 'gatsby-plugin-image';
|
|
10
5
|
import { Link } from 'gatsby';
|
|
@@ -24,32 +19,23 @@ const ProductLogos = (props) => {
|
|
|
24
19
|
|
|
25
20
|
let image;
|
|
26
21
|
if (filteredGatsbyImage.length) {
|
|
27
|
-
image = getImage(
|
|
28
|
-
filteredGatsbyImage[0].gatsbyImageData
|
|
29
|
-
);
|
|
22
|
+
image = getImage(filteredGatsbyImage[0].gatsbyImageData);
|
|
30
23
|
}
|
|
31
24
|
|
|
32
25
|
return (
|
|
33
|
-
<Column size=
|
|
34
|
-
<Card className=
|
|
35
|
-
<div className=
|
|
36
|
-
<div className=
|
|
37
|
-
<GatsbyImage
|
|
38
|
-
image={image}
|
|
39
|
-
alt={elt.name}
|
|
40
|
-
className='image'
|
|
41
|
-
/>
|
|
26
|
+
<Column size="4">
|
|
27
|
+
<Card className="mr-7 mt-7" shadow="none">
|
|
28
|
+
<div className="px-6">
|
|
29
|
+
<div className="mt-6 px-8 py-8 container w-auto">
|
|
30
|
+
<GatsbyImage image={image} alt={elt.name} className="image" />
|
|
42
31
|
</div>
|
|
43
|
-
<div className=
|
|
44
|
-
<p className=
|
|
45
|
-
<Link
|
|
46
|
-
href={image.images.fallback.src}
|
|
47
|
-
download
|
|
48
|
-
>
|
|
32
|
+
<div className="d-flex align-items-center">
|
|
33
|
+
<p className="imgName mr-auto">{elt.name} </p>
|
|
34
|
+
<Link href={image.images.fallback.src} download>
|
|
49
35
|
<Icon
|
|
50
36
|
size={16}
|
|
51
|
-
name=
|
|
52
|
-
className=
|
|
37
|
+
name="download"
|
|
38
|
+
className="mr-3 imgName"
|
|
53
39
|
onClick={() => props.toggleToast(`Downloading ${elt.name}`)}
|
|
54
40
|
/>
|
|
55
41
|
</Link>
|