this.gui 1.0.15 → 1.0.17
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/README.md +178 -49
- package/dist/style.css +1 -1
- package/dist/this-gui.es.js +4645 -1922
- package/dist/this-gui.umd.js +34 -22
- package/package.json +14 -14
- package/src/App.jsx +53 -21
- package/src/Page.jsx +28 -0
- package/src/SiteBuilder.jsx +39 -0
- package/src/example.json +43 -0
- package/src/index.mdx +10 -0
- package/src/main.jsx +11 -14
- package/src/scripts/ComponentRegistry.js +70 -0
- package/src/scripts/postinstall.js +40 -1
- package/src/scripts/renderComponents.js +11 -0
- package/src/stories/Atoms/Alert/Alert.css +196 -14
- package/src/stories/Atoms/Alert/Alert.jsx +43 -28
- package/src/stories/Atoms/Alert/Alert.stories.jsx +154 -28
- package/src/stories/Atoms/Audio/Audio.css +246 -16
- package/src/stories/Atoms/Audio/Audio.jsx +204 -29
- package/src/stories/Atoms/Audio/Audio.stories.jsx +178 -28
- package/src/stories/Atoms/Badge/Badge.css +235 -15
- package/src/stories/Atoms/Badge/Badge.jsx +44 -31
- package/src/stories/Atoms/Badge/Badge.stories.jsx +109 -29
- package/src/stories/Atoms/Button/Button.css +106 -45
- package/src/stories/Atoms/Button/Button.jsx +31 -82
- package/src/stories/Atoms/Button/Button.stories.jsx +170 -40
- package/src/stories/Atoms/Caption/Caption.css +156 -16
- package/src/stories/Atoms/Caption/Caption.jsx +62 -31
- package/src/stories/Atoms/Caption/Caption.stories.jsx +194 -28
- package/src/stories/Atoms/Checkbox/Checkbox.css +168 -15
- package/src/stories/Atoms/Checkbox/Checkbox.jsx +73 -31
- package/src/stories/Atoms/Checkbox/Checkbox.stories.jsx +98 -27
- package/src/stories/Atoms/Container/Container.css +75 -15
- package/src/stories/Atoms/Container/Container.jsx +41 -28
- package/src/stories/Atoms/Container/Container.stories.jsx +92 -29
- package/src/stories/Atoms/Divider/Divider.css +131 -13
- package/src/stories/Atoms/Divider/Divider.jsx +54 -33
- package/src/stories/Atoms/Divider/Divider.stories.jsx +93 -29
- package/src/stories/Atoms/Grid/Grid.css +160 -0
- package/src/stories/Atoms/Grid/Grid.jsx +43 -0
- package/src/stories/Atoms/Grid/Grid.stories.jsx +84 -0
- package/src/stories/Atoms/Heading/Heading.css +99 -16
- package/src/stories/Atoms/Heading/Heading.jsx +57 -29
- package/src/stories/Atoms/Heading/Heading.stories.jsx +117 -28
- package/src/stories/Atoms/Icon/Icon.css +219 -27
- package/src/stories/Atoms/Icon/Icon.jsx +67 -38
- package/src/stories/Atoms/Icon/Icon.stories.jsx +156 -51
- package/src/stories/Atoms/Image/Image.css +231 -15
- package/src/stories/Atoms/Image/Image.jsx +166 -32
- package/src/stories/Atoms/Image/Image.stories.jsx +319 -28
- package/src/stories/Atoms/Label/Label.css +158 -16
- package/src/stories/Atoms/Label/Label.jsx +61 -31
- package/src/stories/Atoms/Label/Label.stories.jsx +167 -28
- package/src/stories/Atoms/Link/Link.css +58 -16
- package/src/stories/Atoms/Link/Link.jsx +73 -32
- package/src/stories/Atoms/Link/Link.stories.jsx +141 -29
- package/src/stories/Atoms/Loader/Loader.css +93 -16
- package/src/stories/Atoms/Loader/Loader.jsx +47 -30
- package/src/stories/Atoms/Loader/Loader.stories.jsx +86 -28
- package/src/stories/Atoms/Logo/Logo.css +94 -0
- package/src/stories/Atoms/Logo/Logo.jsx +53 -0
- package/src/stories/Atoms/Logo/Logo.stories.jsx +120 -0
- package/src/stories/Atoms/Paragraph/Paragraph.css +167 -16
- package/src/stories/Atoms/Paragraph/Paragraph.jsx +67 -31
- package/src/stories/Atoms/Paragraph/Paragraph.stories.jsx +130 -28
- package/src/stories/Atoms/ProgressBar/ProgressBar.css +115 -17
- package/src/stories/Atoms/ProgressBar/ProgressBar.jsx +30 -31
- package/src/stories/Atoms/ProgressBar/ProgressBar.stories.jsx +72 -27
- package/src/stories/Atoms/RadioButton/RadioButton.css +118 -17
- package/src/stories/Atoms/RadioButton/RadioButton.jsx +77 -31
- package/src/stories/Atoms/RadioButton/RadioButton.stories.jsx +99 -27
- package/src/stories/Atoms/Range/Range.css +169 -0
- package/src/stories/Atoms/Range/Range.jsx +87 -0
- package/src/stories/Atoms/Range/Range.stories.jsx +110 -0
- package/src/stories/Atoms/Section/Section.css +268 -0
- package/src/stories/Atoms/Section/Section.jsx +63 -0
- package/src/stories/Atoms/Section/Section.stories.jsx +46 -0
- package/src/stories/Atoms/Select/Select.css +74 -16
- package/src/stories/Atoms/Select/Select.jsx +62 -30
- package/src/stories/Atoms/Select/Select.stories.jsx +95 -27
- package/src/stories/Atoms/Slider/Slider.css +77 -16
- package/src/stories/Atoms/Slider/Slider.jsx +119 -31
- package/src/stories/Atoms/Slider/Slider.stories.jsx +77 -28
- package/src/stories/Atoms/Snackbar/Snackbar.css +297 -13
- package/src/stories/Atoms/Snackbar/Snackbar.jsx +62 -31
- package/src/stories/Atoms/Snackbar/Snackbar.stories.jsx +63 -26
- package/src/stories/Atoms/Spacer/Spacer.css +101 -16
- package/src/stories/Atoms/Spacer/Spacer.jsx +26 -32
- package/src/stories/Atoms/Spacer/Spacer.stories.jsx +50 -30
- package/src/stories/Atoms/Spinner/Spinner.css +97 -16
- package/src/stories/Atoms/Spinner/Spinner.jsx +50 -26
- package/src/stories/Atoms/Spinner/Spinner.stories.jsx +47 -30
- package/src/stories/Atoms/Tag/Tag.css +97 -14
- package/src/stories/Atoms/Tag/Tag.jsx +58 -24
- package/src/stories/Atoms/Tag/Tag.stories.jsx +55 -29
- package/src/stories/Atoms/TextArea/TextArea.css +85 -15
- package/src/stories/Atoms/TextArea/TextArea.jsx +108 -31
- package/src/stories/Atoms/TextArea/TextArea.stories.jsx +25 -30
- package/src/stories/Atoms/TextInput/TextInput.css +90 -17
- package/src/stories/Atoms/TextInput/TextInput.jsx +119 -27
- package/src/stories/Atoms/TextInput/TextInput.stories.jsx +53 -25
- package/src/stories/Atoms/Toggle/Toggle.css +106 -17
- package/src/stories/Atoms/Toggle/Toggle.jsx +56 -28
- package/src/stories/Atoms/Toggle/Toggle.stories.jsx +24 -30
- package/src/stories/Atoms/Tooltip/Tooltip.css +368 -14
- package/src/stories/Atoms/Tooltip/Tooltip.jsx +33 -28
- package/src/stories/Atoms/Tooltip/Tooltip.stories.jsx +42 -31
- package/src/stories/Atoms/Video/Video.css +28 -18
- package/src/stories/Atoms/Video/Video.jsx +66 -29
- package/src/stories/Atoms/Video/Video.stories.jsx +30 -30
- package/src/stories/Atoms/index.js +9 -2
- package/src/stories/Atoms/meta_Atoms.js +6 -1
- package/src/stories/Layouts/Accordion/Accordion.css +293 -0
- package/src/stories/Layouts/Accordion/Accordion.jsx +74 -0
- package/src/stories/Layouts/Accordion/Accordion.stories.jsx +39 -0
- package/src/stories/Layouts/Flexbox/Flexbox.css +16 -0
- package/src/stories/Layouts/Flexbox/Flexbox.jsx +11 -0
- package/src/stories/Layouts/Flexbox/Flexbox.stories.jsx +28 -0
- package/src/stories/Layouts/Footer/Footer.css +16 -0
- package/src/stories/Layouts/Footer/Footer.jsx +31 -0
- package/src/stories/Layouts/Footer/Footer.stories.jsx +28 -0
- package/src/stories/Layouts/Header/Header.css +16 -0
- package/src/stories/Layouts/Header/Header.jsx +31 -0
- package/src/stories/Layouts/Header/Header.stories.jsx +28 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.css +16 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.jsx +31 -0
- package/src/stories/Layouts/HeroBanner/HeroBanner.stories.jsx +28 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.css +16 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.jsx +31 -0
- package/src/stories/Layouts/HeroImageVideo/HeroImageVideo.stories.jsx +28 -0
- package/src/stories/Layouts/Pagination/Pagination.css +16 -0
- package/src/stories/Layouts/Pagination/Pagination.jsx +31 -0
- package/src/stories/Layouts/Pagination/Pagination.stories.jsx +28 -0
- package/src/stories/Layouts/Sidebar/Sidebar.css +16 -0
- package/src/stories/Layouts/Sidebar/Sidebar.jsx +71 -0
- package/src/stories/Layouts/Sidebar/Sidebar.stories.jsx +28 -0
- package/src/stories/Layouts/Tabs/Tabs.css +16 -0
- package/src/stories/Layouts/Tabs/Tabs.jsx +31 -0
- package/src/stories/Layouts/Tabs/Tabs.stories.jsx +28 -0
- package/src/stories/Layouts/index.js +25 -0
- package/src/stories/Layouts/meta_Layouts.js +28 -0
- package/src/stories/Molecules/Accordion/Accordion.css +1 -1
- package/src/stories/Molecules/Accordion/Accordion.jsx +1 -1
- package/src/stories/Molecules/Accordion/Accordion.stories.jsx +1 -1
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.css +95 -2
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.jsx +232 -13
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.stories.jsx +46 -11
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.css +128 -2
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.jsx +69 -14
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.stories.jsx +12 -12
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.css +145 -2
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.jsx +39 -13
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.stories.jsx +27 -11
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.css +463 -2
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.jsx +34 -12
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.stories.jsx +36 -12
- package/src/stories/Molecules/Card/Card.css +39 -2
- package/src/stories/Molecules/Card/Card.jsx +80 -13
- package/src/stories/Molecules/Card/Card.stories.jsx +27 -13
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.css +33 -2
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.jsx +91 -12
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.stories.jsx +73 -12
- package/src/stories/Molecules/Dropdown/Dropdown.css +192 -0
- package/src/stories/Molecules/Dropdown/Dropdown.jsx +96 -0
- package/src/stories/Molecules/Dropdown/Dropdown.stories.jsx +45 -0
- package/src/stories/Molecules/Navbar/Navbar.css +63 -59
- package/src/stories/Molecules/Navbar/Navbar.jsx +43 -48
- package/src/stories/Molecules/Navbar/Navbar.stories.jsx +58 -8
- package/src/stories/Molecules/SearchBar/SearchBar.css +66 -1
- package/src/stories/Molecules/SearchBar/SearchBar.jsx +59 -11
- package/src/stories/Molecules/SearchBar/SearchBar.stories.jsx +16 -7
- package/src/stories/Molecules/SelectTheme/SelectTheme.jsx +16 -38
- package/src/stories/Molecules/SelectTheme/SelectTheme.stories.jsx +1 -2
- package/src/stories/Molecules/Sidebar/Sidebar.css +65 -2
- package/src/stories/Molecules/Sidebar/Sidebar.jsx +66 -11
- package/src/stories/Molecules/Sidebar/Sidebar.stories.jsx +20 -5
- package/src/stories/Molecules/index.js +2 -1
- package/src/stories/Molecules/{Molecules.js → meta_Molecules.js} +6 -3
- package/src/stories/Templates/AdminDashboard/AdminDashboard.css +7 -0
- package/src/stories/Templates/AdminDashboard/AdminDashboard.jsx +24 -0
- package/src/stories/Templates/AdminDashboard/AdminDashboard.stories.jsx +20 -0
- package/src/stories/Templates/CallToAction/CallToAction.css +7 -0
- package/src/stories/Templates/CallToAction/CallToAction.jsx +24 -0
- package/src/stories/Templates/CallToAction/CallToAction.stories.jsx +20 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.css +7 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.jsx +24 -0
- package/src/stories/Templates/FeaturesList/FeaturesList.stories.jsx +20 -0
- package/src/stories/Templates/FormSection/FormSection.css +7 -0
- package/src/stories/Templates/FormSection/FormSection.jsx +24 -0
- package/src/stories/Templates/FormSection/FormSection.stories.jsx +20 -0
- package/src/stories/Templates/HeroSection/HeroSection.css +7 -0
- package/src/stories/Templates/HeroSection/HeroSection.jsx +24 -0
- package/src/stories/Templates/HeroSection/HeroSection.stories.jsx +20 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.css +7 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.jsx +24 -0
- package/src/stories/Templates/LocationInfo/LocationInfo.stories.jsx +20 -0
- package/src/stories/Templates/ProductPage/ProductPage.css +7 -0
- package/src/stories/Templates/ProductPage/ProductPage.jsx +24 -0
- package/src/stories/Templates/ProductPage/ProductPage.stories.jsx +20 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.css +7 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.jsx +24 -0
- package/src/stories/Templates/RegistrationPage/RegistrationPage.stories.jsx +20 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.css +7 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.jsx +24 -0
- package/src/stories/Templates/ShoppingCart/ShoppingCart.stories.jsx +20 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.css +7 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.jsx +24 -0
- package/src/stories/Templates/SidebarTopNav/SidebarTopNav.stories.jsx +20 -0
- package/src/stories/Templates/SignInPage/SignInPage.css +7 -0
- package/src/stories/Templates/SignInPage/SignInPage.jsx +24 -0
- package/src/stories/Templates/SignInPage/SignInPage.stories.jsx +20 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.css +7 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.jsx +24 -0
- package/src/stories/Templates/SocialMediaLinks/SocialMediaLinks.stories.jsx +20 -0
- package/src/stories/Templates/Testimonials/Testimonials.css +7 -0
- package/src/stories/Templates/Testimonials/Testimonials.jsx +24 -0
- package/src/stories/Templates/Testimonials/Testimonials.stories.jsx +20 -0
- package/src/stories/Templates/index.js +33 -0
- package/src/stories/Templates/{Templates.js → meta_Templates.js} +3 -1
- package/src/stories/assets/logo.png +0 -0
- package/src/stories/assets/logo.svg +106 -0
- package/src/stories/assets/test.svg +3 -0
- package/src/themes/README_Styles.md +301 -0
- package/src/themes/ThemeProvider.jsx +47 -22
- package/src/themes/styles/dracula/dark.css +0 -0
- package/src/themes/styles/dracula/light.css +0 -0
- package/src/themes/styles/github/dark.css +0 -0
- package/src/themes/styles/github/light.css +0 -0
- package/src/themes/styles/neurons/dark.css +247 -0
- package/src/themes/styles/neurons/light.css +280 -0
- package/dist/Styles.md +0 -446
- package/dist/context.md +0 -942
- package/dist/github-3688a83a.js +0 -5
- package/dist/gothic-94a7ecd6.js +0 -5
- package/dist/newsprint-32bf94d9.js +0 -5
- package/dist/night-4a954853.js +0 -5
- package/dist/pixyll-94de4610.js +0 -5
- package/dist/whitey-db68723e.js +0 -5
- package/src/MDXEditor.jsx +0 -32
- package/src/Theme.jsx +0 -28
- package/src/components/CodeBlock.jsx +0 -22
- package/src/components/ComponentFactory.jsx +0 -36
- package/src/components/ComponentRegistry.js +0 -21
- package/src/scripts/generateComponents.js +0 -166
- package/src/scripts/verifyMolecules.js +0 -158
- package/src/scripts/verify_and_install_atoms.js +0 -211
- package/src/stories/Atoms/RangeInput/RangeInput.css +0 -29
- package/src/stories/Atoms/RangeInput/RangeInput.jsx +0 -41
- package/src/stories/Atoms/RangeInput/RangeInput.stories.jsx +0 -41
- package/src/stories/Components.md +0 -189
- package/src/stories/Layouts/Grid/Grid.css +0 -4
- package/src/stories/Layouts/Grid/Grid.jsx +0 -15
- package/src/stories/Layouts/Grid/Grid.stories.jsx +0 -26
- package/src/stories/Layouts/Layout.js +0 -28
- package/src/styles/Header.modules.css +0 -32
- package/src/styles/global.css +0 -59
- package/src/themes/Themes.js +0 -44
- package/src/themes/dark.js +0 -22
- package/src/themes/light.js +0 -22
- package/src/themes/typ/Readme.md +0 -4
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-700italic.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-italic.woff2 +0 -0
- package/src/themes/typ/github/open-sans-v17-latin-ext_latin-regular.woff2 +0 -0
- package/src/themes/typ/github.css +0 -416
- package/src/themes/typ/gothic/GUST e-foundry License.txt +0 -29
- package/src/themes/typ/gothic/didact-gothic-c-ext.woff2 +0 -0
- package/src/themes/typ/gothic/didact-gothic-c.woff2 +0 -0
- package/src/themes/typ/gothic/texgyreadventor-bold.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-bolditalic.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-italic.woff +0 -0
- package/src/themes/typ/gothic/texgyreadventor-regular.woff +0 -0
- package/src/themes/typ/gothic.css +0 -410
- package/src/themes/typ/newsprint/pt-serif-v11-latin-700.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-700italic.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-italic.woff2 +0 -0
- package/src/themes/typ/newsprint/pt-serif-v11-latin-regular.woff2 +0 -0
- package/src/themes/typ/newsprint.css +0 -622
- package/src/themes/typ/night/codeblock.dark.css +0 -113
- package/src/themes/typ/night/credit.html +0 -1
- package/src/themes/typ/night/cursor.png +0 -0
- package/src/themes/typ/night/cursor@2x.png +0 -0
- package/src/themes/typ/night/mermaid.dark.css +0 -7
- package/src/themes/typ/night/sourcemode.dark.css +0 -38
- package/src/themes/typ/night.css +0 -1032
- package/src/themes/typ/pixyll/lato-v14-latin-300.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-300italic.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-900.woff +0 -0
- package/src/themes/typ/pixyll/lato-v14-latin-900italic.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-300.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-300italic.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-700.woff +0 -0
- package/src/themes/typ/pixyll/merriweather-v19-latin-700italic.woff +0 -0
- package/src/themes/typ/pixyll.css +0 -528
- package/src/themes/typ/whitey.css +0 -299
- /package/src/stories/Organisms/{Organisms.js → meta_Organisms.js} +0 -0
|
@@ -1,4 +1,67 @@
|
|
|
1
|
-
|
|
1
|
+
/* CSS variables for dynamic styling */
|
|
2
2
|
.sidebar {
|
|
3
|
-
/*
|
|
3
|
+
--sidebar-background-color: rgba(34, 139, 34, 0.1); /* Light greenish background */
|
|
4
|
+
--sidebar-border-color: rgba(34, 139, 34, 0.2); /* Light border with dark greenish color */
|
|
5
|
+
--sidebar-padding: 16px;
|
|
6
|
+
--sidebar-width: 250px;
|
|
7
|
+
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
background-color: var(--sidebar-background-color);
|
|
12
|
+
border-right: 1px solid var(--sidebar-border-color);
|
|
13
|
+
padding: var(--sidebar-padding);
|
|
14
|
+
width: var(--sidebar-width);
|
|
15
|
+
height: 100vh;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.sidebar__logo {
|
|
20
|
+
--sidebar-logo-margin-bottom: 24px;
|
|
21
|
+
|
|
22
|
+
margin-bottom: var(--sidebar-logo-margin-bottom);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.sidebar__links {
|
|
26
|
+
list-style: none;
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 0;
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.sidebar__item {
|
|
33
|
+
--sidebar-item-margin: 12px 0;
|
|
34
|
+
|
|
35
|
+
margin: var(--sidebar-item-margin);
|
|
36
|
+
width: 100%;
|
|
4
37
|
}
|
|
38
|
+
|
|
39
|
+
.sidebar__link {
|
|
40
|
+
--sidebar-link-color: #006400;
|
|
41
|
+
--sidebar-link-padding: 8px 16px;
|
|
42
|
+
|
|
43
|
+
display: block;
|
|
44
|
+
color: var(--sidebar-link-color);
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
padding: var(--sidebar-link-padding);
|
|
47
|
+
width: 100%;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sidebar__link:hover,
|
|
52
|
+
.sidebar__link--active {
|
|
53
|
+
--sidebar-link-hover-background-color: rgba(34, 139, 34, 0.2);
|
|
54
|
+
--sidebar-link-hover-border-radius: 4px;
|
|
55
|
+
|
|
56
|
+
background-color: var(--sidebar-link-hover-background-color);
|
|
57
|
+
border-radius: var(--sidebar-link-hover-border-radius);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.sidebar__controls {
|
|
61
|
+
--sidebar-controls-margin-top: 24px;
|
|
62
|
+
|
|
63
|
+
margin-top: var(--sidebar-controls-margin-top);
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: 16px;
|
|
67
|
+
}
|
|
@@ -1,25 +1,80 @@
|
|
|
1
|
-
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import './Sidebar.css';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export const Sidebar = ({
|
|
6
|
+
links,
|
|
7
|
+
logo,
|
|
8
|
+
userControls,
|
|
9
|
+
styleOverrides = {},
|
|
10
|
+
}) => {
|
|
11
|
+
// Build the style object for CSS variable overrides
|
|
12
|
+
const style = {};
|
|
13
|
+
|
|
14
|
+
// Map of styleOverrides keys to CSS variable names
|
|
15
|
+
const cssVariableMap = {
|
|
16
|
+
sidebarBackgroundColor: '--sidebar-background-color',
|
|
17
|
+
sidebarBorderColor: '--sidebar-border-color',
|
|
18
|
+
sidebarPadding: '--sidebar-padding',
|
|
19
|
+
sidebarWidth: '--sidebar-width',
|
|
20
|
+
logoMarginBottom: '--sidebar-logo-margin-bottom',
|
|
21
|
+
itemMargin: '--sidebar-item-margin',
|
|
22
|
+
linkColor: '--sidebar-link-color',
|
|
23
|
+
linkPadding: '--sidebar-link-padding',
|
|
24
|
+
linkHoverBackgroundColor: '--sidebar-link-hover-background-color',
|
|
25
|
+
linkHoverBorderRadius: '--sidebar-link-hover-border-radius',
|
|
26
|
+
controlsMarginTop: '--sidebar-controls-margin-top',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// Set CSS variables based on styleOverrides
|
|
30
|
+
Object.keys(styleOverrides).forEach((key) => {
|
|
31
|
+
const cssVar = cssVariableMap[key];
|
|
32
|
+
if (cssVar) {
|
|
33
|
+
style[cssVar] = styleOverrides[key];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
10
37
|
return (
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
38
|
+
<aside className="sidebar" style={style}>
|
|
39
|
+
<div className="sidebar__logo">
|
|
40
|
+
{logo}
|
|
41
|
+
</div>
|
|
42
|
+
<ul className="sidebar__links">
|
|
43
|
+
{links.map((link, index) => (
|
|
44
|
+
<li key={index} className="sidebar__item">
|
|
45
|
+
<a
|
|
46
|
+
href={link.url}
|
|
47
|
+
className={`sidebar__link ${link.isActive ? 'sidebar__link--active' : ''}`}
|
|
48
|
+
>
|
|
49
|
+
{link.label}
|
|
50
|
+
</a>
|
|
51
|
+
</li>
|
|
52
|
+
))}
|
|
53
|
+
</ul>
|
|
54
|
+
<div className="sidebar__controls">
|
|
55
|
+
{userControls}
|
|
56
|
+
</div>
|
|
57
|
+
</aside>
|
|
14
58
|
);
|
|
15
59
|
};
|
|
16
60
|
|
|
17
61
|
Sidebar.propTypes = {
|
|
18
|
-
|
|
62
|
+
links: PropTypes.arrayOf(
|
|
63
|
+
PropTypes.shape({
|
|
64
|
+
url: PropTypes.string.isRequired,
|
|
65
|
+
label: PropTypes.string.isRequired,
|
|
66
|
+
isActive: PropTypes.bool,
|
|
67
|
+
})
|
|
68
|
+
).isRequired,
|
|
69
|
+
logo: PropTypes.node,
|
|
70
|
+
userControls: PropTypes.node,
|
|
71
|
+
styleOverrides: PropTypes.object,
|
|
19
72
|
};
|
|
20
73
|
|
|
21
74
|
Sidebar.defaultProps = {
|
|
22
|
-
|
|
75
|
+
logo: null,
|
|
76
|
+
userControls: null,
|
|
77
|
+
styleOverrides: {},
|
|
23
78
|
};
|
|
24
79
|
|
|
25
|
-
export default Sidebar;
|
|
80
|
+
export default Sidebar;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
1
|
import { Sidebar } from './Sidebar';
|
|
3
2
|
|
|
4
|
-
// Storybook configuration for Sidebar component
|
|
5
3
|
export default {
|
|
6
4
|
title: 'Molecules/Navigation/Sidebar',
|
|
7
5
|
component: Sidebar,
|
|
@@ -9,12 +7,29 @@ export default {
|
|
|
9
7
|
layout: 'centered',
|
|
10
8
|
},
|
|
11
9
|
argTypes: {
|
|
12
|
-
// Define argTypes here
|
|
10
|
+
// Define argTypes here for dynamic controls in Storybook
|
|
13
11
|
},
|
|
14
12
|
};
|
|
15
13
|
|
|
16
14
|
export const Default = {
|
|
17
15
|
args: {
|
|
18
|
-
|
|
16
|
+
links: [
|
|
17
|
+
{ url: '#home', label: 'Home', isActive: true },
|
|
18
|
+
{ url: '#about', label: 'About', isActive: false },
|
|
19
|
+
{ url: '#services', label: 'Services', isActive: false },
|
|
20
|
+
],
|
|
21
|
+
logo: <img src="https://example.com/logo.png" alt="Logo" style={{ width: '100px' }} />,
|
|
22
|
+
userControls: (
|
|
23
|
+
<>
|
|
24
|
+
<button className="button">Control 1</button>
|
|
25
|
+
<button className="button">Control 2</button>
|
|
26
|
+
</>
|
|
27
|
+
),
|
|
28
|
+
styleOverrides: {
|
|
29
|
+
sidebarBackgroundColor: '#f5f5f5',
|
|
30
|
+
sidebarBorderColor: '#ddd',
|
|
31
|
+
sidebarPadding: '20px',
|
|
32
|
+
sidebarWidth: '280px',
|
|
33
|
+
},
|
|
19
34
|
},
|
|
20
|
-
};
|
|
35
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/stories/Molecules/index.js
|
|
2
|
-
|
|
3
2
|
// Import all components as named exports
|
|
4
3
|
import { Navbar } from './Navbar/Navbar';
|
|
5
4
|
import { Sidebar } from './Sidebar/Sidebar';
|
|
6
5
|
import { Breadcrumbs } from './Breadcrumbs/Breadcrumbs';
|
|
6
|
+
import { Dropdown } from './Dropdown/Dropdown';
|
|
7
7
|
import { InputGroup } from './InputGroup/InputGroup';
|
|
8
8
|
import { InputWithLabel } from './InputWithLabel/InputWithLabel';
|
|
9
9
|
import { SearchBar } from './SearchBar/SearchBar';
|
|
@@ -30,6 +30,7 @@ import { SelectTheme } from './SelectTheme/SelectTheme';
|
|
|
30
30
|
const Molecules = {
|
|
31
31
|
Navbar,
|
|
32
32
|
Sidebar,
|
|
33
|
+
Dropdown,
|
|
33
34
|
Breadcrumbs,
|
|
34
35
|
InputGroup,
|
|
35
36
|
InputWithLabel,
|
|
@@ -5,6 +5,9 @@ const Molecules = {
|
|
|
5
5
|
{ name: "Sidebar", paths: { css: "./Sidebar/Sidebar.css", globalCss: "styles/global.css", jsx: "./Sidebar/Sidebar.jsx", stories: "./Sidebar/Sidebar.stories.jsx" }},
|
|
6
6
|
{ name: "Breadcrumbs", paths: { css: "./Breadcrumbs/Breadcrumbs.css", globalCss: "styles/global.css", jsx: "./Breadcrumbs/Breadcrumbs.jsx", stories: "./Breadcrumbs/Breadcrumbs.stories.jsx" }},
|
|
7
7
|
],
|
|
8
|
+
"Menus": [
|
|
9
|
+
{ name: "Dropdown", paths: { css: "./Dropdown/Dropdown.css", globalCss: "styles/global.css", jsx: "./Layout/Dropdown/Dropdown.jsx", stories: "src/stories/Layout/Dropdown/Dropdown.stories.jsx" }},
|
|
10
|
+
],
|
|
8
11
|
"FormElements": [
|
|
9
12
|
{ name: "InputGroup ", paths: { css: "./InputGroup/InputGroup.css", globalCss: "styles/global.css", jsx: "./InputGroup/InputGroup.jsx", stories: "src/stories/Molecules/InputGroup/InputGroup.stories.jsx" }},
|
|
10
13
|
{ name: "InputWithLabel", paths: { css: "./InputWithLabel/InputWithLabel.css", globalCss: "styles/global.css", jsx: "./InputWithLabel/InputWithLabel.jsx", stories: "src/stories/Molecules/InputWithLabel/InputWithLabel.stories.jsx" }},
|
|
@@ -16,18 +19,18 @@ const Molecules = {
|
|
|
16
19
|
{ name: "IconButton", paths: { css: "./IconButton/IconButton.css", globalCss: "styles/global.css", jsx: "./IconButton/IconButton.jsx", stories: "src/stories/Molecules/IconButton/IconButton.stories.jsx" }},
|
|
17
20
|
{ name: "ButtonGroup", paths: { css: "./ButtonGroup/ButtonGroup.css", globalCss: "styles/global.css", jsx: "./ButtonGroup/ButtonGroup.jsx", stories: "src/stories/Molecules/ButtonGroup/ButtonGroup.stories.jsx" }},
|
|
18
21
|
],
|
|
19
|
-
"
|
|
22
|
+
"Media": [
|
|
20
23
|
{ name: "ImageWithCaption", paths: { css: "./ImageWithCaption/ImageWithCaption.css", globalCss: "styles/global.css", jsx: "./ImageWithCaption/ImageWithCaption.jsx", stories: "src/stories/Molecules/ImageWithCaption/ImageWithCaption.stories.jsx" }},
|
|
21
24
|
{ name: "VideoWithDescription", paths: { css: "./VideoWithDescription/VideoWithDescription.css", globalCss: "styles/global.css", jsx: "./VideoWithDescription/VideoWithDescription.jsx", stories: "src/stories/Molecules/VideoWithDescription/VideoWithDescription.stories.jsx" }},
|
|
22
|
-
{ name: "AvatarWithName", paths: { css: "./AvatarWithName/AvatarWithName.css", globalCss: "styles/global.css", jsx: "./AvatarWithName/AvatarWithName.jsx", stories: "src/stories/Molecules/AvatarWithName/AvatarWithName.stories.jsx" }},
|
|
23
25
|
{ name: "AudioPlayer", paths: { css: "./AudioPlayer/AudioPlayer.css", globalCss: "styles/global.css", jsx: "./AudioPlayer/AudioPlayer.jsx", stories: "src/stories/Molecules/AudioPlayer/AudioPlayer.stories.jsx" }},
|
|
24
26
|
],
|
|
25
|
-
"
|
|
27
|
+
"Display": [
|
|
26
28
|
{ name: "SelectTheme", paths: { css: "./SelectTheme/SelectTheme.css", globalCss: "styles/global.css", jsx: "./SelectTheme/SelectTheme.jsx", stories: "src/stories/Molecules/SelectTheme/SelectTheme.stories.jsx" }},
|
|
27
29
|
{ name: "Card", paths: { css: "./Card/Card.css", globalCss: "styles/global.css", jsx: "./Card/Card.jsx", stories: "./Card/Card.stories.jsx" }},
|
|
28
30
|
{ name: "MediaCard", paths: { css: "./MediaCard/MediaCard.css", globalCss: "styles/global.css", jsx: "./MediaCard/MediaCard.jsx", stories: "./MediaCard/MediaCard.stories.jsx" }},
|
|
29
31
|
{ name: "List", paths: { css: "./List/List.css", globalCss: "styles/global.css", jsx: "./List/List.jsx", stories: "./List/List.stories.jsx" }},
|
|
30
32
|
{ name: "Accordion", paths: { css: "./Accordion/Accordion.css", globalCss: "styles/global.css", jsx: "./Accordion/Accordion.jsx", stories: "./Accordion/Accordion.stories.jsx" }},
|
|
33
|
+
{ name: "AvatarWithName", paths: { css: "./AvatarWithName/AvatarWithName.css", globalCss: "styles/global.css", jsx: "./AvatarWithName/AvatarWithName.jsx", stories: "src/stories/Molecules/AvatarWithName/AvatarWithName.stories.jsx" }},
|
|
31
34
|
],
|
|
32
35
|
"FeedbackMolecules": [
|
|
33
36
|
{ name: "Notification", paths: { css: "./Notification/Notification.css", globalCss: "styles/global.css", jsx: "./Notification/Notification.jsx", stories: "src/stories/Molecules/Notification/Notification.stories.jsx" }},
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './AdminDashboard.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* AdminDashboard template component
|
|
8
|
+
*/
|
|
9
|
+
export const AdminDashboard = ({ children, ...props }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="admindashboard" {...props}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
AdminDashboard.propTypes = {
|
|
18
|
+
/**
|
|
19
|
+
* Children components to be rendered inside the template
|
|
20
|
+
*/
|
|
21
|
+
children: PropTypes.node.isRequired,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default AdminDashboard;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { AdminDashboard } from './AdminDashboard';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for AdminDashboard template
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/DashboardLayouts/AdminDashboard',
|
|
7
|
+
component: AdminDashboard,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: { control: 'text' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'This is a default AdminDashboard template.',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './CallToAction.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* CallToAction template component
|
|
8
|
+
*/
|
|
9
|
+
export const CallToAction = ({ children, ...props }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="calltoaction" {...props}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
CallToAction.propTypes = {
|
|
18
|
+
/**
|
|
19
|
+
* Children components to be rendered inside the template
|
|
20
|
+
*/
|
|
21
|
+
children: PropTypes.node.isRequired,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default CallToAction;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { CallToAction } from './CallToAction';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for CallToAction template
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/LandingPages/CallToAction',
|
|
7
|
+
component: CallToAction,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: { control: 'text' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'This is a default CallToAction template.',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './FeaturesList.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* FeaturesList template component
|
|
8
|
+
*/
|
|
9
|
+
export const FeaturesList = ({ children, ...props }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="featureslist" {...props}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
FeaturesList.propTypes = {
|
|
18
|
+
/**
|
|
19
|
+
* Children components to be rendered inside the template
|
|
20
|
+
*/
|
|
21
|
+
children: PropTypes.node.isRequired,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default FeaturesList;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { FeaturesList } from './FeaturesList';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for FeaturesList template
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/LandingPages/FeaturesList',
|
|
7
|
+
component: FeaturesList,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: { control: 'text' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'This is a default FeaturesList template.',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './FormSection.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* FormSection template component
|
|
8
|
+
*/
|
|
9
|
+
export const FormSection = ({ children, ...props }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="formsection" {...props}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
FormSection.propTypes = {
|
|
18
|
+
/**
|
|
19
|
+
* Children components to be rendered inside the template
|
|
20
|
+
*/
|
|
21
|
+
children: PropTypes.node.isRequired,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default FormSection;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { FormSection } from './FormSection';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for FormSection template
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/ContactUsPages/FormSection',
|
|
7
|
+
component: FormSection,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: { control: 'text' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'This is a default FormSection template.',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './HeroSection.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* HeroSection template component
|
|
8
|
+
*/
|
|
9
|
+
export const HeroSection = ({ children, ...props }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="herosection" {...props}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
HeroSection.propTypes = {
|
|
18
|
+
/**
|
|
19
|
+
* Children components to be rendered inside the template
|
|
20
|
+
*/
|
|
21
|
+
children: PropTypes.node.isRequired,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default HeroSection;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { HeroSection } from './HeroSection';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for HeroSection template
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/LandingPages/HeroSection',
|
|
7
|
+
component: HeroSection,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: { control: 'text' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'This is a default HeroSection template.',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './LocationInfo.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* LocationInfo template component
|
|
8
|
+
*/
|
|
9
|
+
export const LocationInfo = ({ children, ...props }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="locationinfo" {...props}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
LocationInfo.propTypes = {
|
|
18
|
+
/**
|
|
19
|
+
* Children components to be rendered inside the template
|
|
20
|
+
*/
|
|
21
|
+
children: PropTypes.node.isRequired,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default LocationInfo;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { LocationInfo } from './LocationInfo';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for LocationInfo template
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/ContactUsPages/LocationInfo',
|
|
7
|
+
component: LocationInfo,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: { control: 'text' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'This is a default LocationInfo template.',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './ProductPage.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* ProductPage template component
|
|
8
|
+
*/
|
|
9
|
+
export const ProductPage = ({ children, ...props }) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="productpage" {...props}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
ProductPage.propTypes = {
|
|
18
|
+
/**
|
|
19
|
+
* Children components to be rendered inside the template
|
|
20
|
+
*/
|
|
21
|
+
children: PropTypes.node.isRequired,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default ProductPage;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { ProductPage } from './ProductPage';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for ProductPage template
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Templates/ECommercePages/ProductPage',
|
|
7
|
+
component: ProductPage,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
children: { control: 'text' },
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
children: 'This is a default ProductPage template.',
|
|
19
|
+
},
|
|
20
|
+
};
|