this.gui 1.0.11 → 1.0.13
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/package.json +5 -2
- package/src/App.jsx +31 -0
- package/src/MDXEditor.jsx +32 -0
- package/src/MdxProvider.jsx +20 -0
- package/src/Theme.jsx +28 -0
- package/src/components/CodeBlock.jsx +22 -0
- package/src/components/ComponentFactory.jsx +36 -0
- package/src/components/ComponentRegistry.js +21 -0
- package/src/index.mdx +154 -0
- package/src/main.jsx +18 -0
- package/src/scripts/generateComponents.js +166 -0
- package/src/scripts/logASCIIArt.js +12 -0
- package/src/scripts/postinstall.js +64 -0
- package/src/scripts/verifyMolecules.js +158 -0
- package/src/scripts/verify_and_install_atoms.js +211 -0
- package/src/stories/Atoms/Alert/Alert.css +29 -0
- package/src/stories/Atoms/Alert/Alert.jsx +41 -0
- package/src/stories/Atoms/Alert/Alert.stories.jsx +41 -0
- package/src/stories/Atoms/Audio/Audio.css +29 -0
- package/src/stories/Atoms/Audio/Audio.jsx +41 -0
- package/src/stories/Atoms/Audio/Audio.stories.jsx +41 -0
- package/src/stories/Atoms/Badge/Badge.css +29 -0
- package/src/stories/Atoms/Badge/Badge.jsx +41 -0
- package/src/stories/Atoms/Badge/Badge.stories.jsx +41 -0
- package/src/stories/Atoms/Button/Button.css +70 -0
- package/src/stories/Atoms/Button/Button.jsx +98 -0
- package/src/stories/Atoms/Button/Button.stories.jsx +54 -0
- package/src/stories/Atoms/Caption/Caption.css +29 -0
- package/src/stories/Atoms/Caption/Caption.jsx +41 -0
- package/src/stories/Atoms/Caption/Caption.stories.jsx +41 -0
- package/src/stories/Atoms/Checkbox/Checkbox.css +29 -0
- package/src/stories/Atoms/Checkbox/Checkbox.jsx +41 -0
- package/src/stories/Atoms/Checkbox/Checkbox.stories.jsx +41 -0
- package/src/stories/Atoms/Container/Container.css +29 -0
- package/src/stories/Atoms/Container/Container.jsx +41 -0
- package/src/stories/Atoms/Container/Container.stories.jsx +41 -0
- package/src/stories/Atoms/Divider/Divider.css +29 -0
- package/src/stories/Atoms/Divider/Divider.jsx +41 -0
- package/src/stories/Atoms/Divider/Divider.stories.jsx +41 -0
- package/src/stories/Atoms/Heading/Heading.css +29 -0
- package/src/stories/Atoms/Heading/Heading.jsx +41 -0
- package/src/stories/Atoms/Heading/Heading.stories.jsx +41 -0
- package/src/stories/Atoms/Icon/Icon.css +48 -0
- package/src/stories/Atoms/Icon/Icon.jsx +51 -0
- package/src/stories/Atoms/Icon/Icon.stories.jsx +72 -0
- package/src/stories/Atoms/Image/Image.css +29 -0
- package/src/stories/Atoms/Image/Image.jsx +41 -0
- package/src/stories/Atoms/Image/Image.stories.jsx +41 -0
- package/src/stories/Atoms/Label/Label.css +29 -0
- package/src/stories/Atoms/Label/Label.jsx +41 -0
- package/src/stories/Atoms/Label/Label.stories.jsx +41 -0
- package/src/stories/Atoms/Link/Link.css +29 -0
- package/src/stories/Atoms/Link/Link.jsx +41 -0
- package/src/stories/Atoms/Link/Link.stories.jsx +41 -0
- package/src/stories/Atoms/Loader/Loader.css +29 -0
- package/src/stories/Atoms/Loader/Loader.jsx +41 -0
- package/src/stories/Atoms/Loader/Loader.stories.jsx +41 -0
- package/src/stories/Atoms/Paragraph/Paragraph.css +29 -0
- package/src/stories/Atoms/Paragraph/Paragraph.jsx +41 -0
- package/src/stories/Atoms/Paragraph/Paragraph.stories.jsx +41 -0
- package/src/stories/Atoms/ProgressBar/ProgressBar.css +29 -0
- package/src/stories/Atoms/ProgressBar/ProgressBar.jsx +41 -0
- package/src/stories/Atoms/ProgressBar/ProgressBar.stories.jsx +41 -0
- package/src/stories/Atoms/RadioButton/RadioButton.css +29 -0
- package/src/stories/Atoms/RadioButton/RadioButton.jsx +41 -0
- package/src/stories/Atoms/RadioButton/RadioButton.stories.jsx +41 -0
- package/src/stories/Atoms/RangeInput/RangeInput.css +29 -0
- package/src/stories/Atoms/RangeInput/RangeInput.jsx +41 -0
- package/src/stories/Atoms/RangeInput/RangeInput.stories.jsx +41 -0
- package/src/stories/Atoms/Select/Select.css +29 -0
- package/src/stories/Atoms/Select/Select.jsx +41 -0
- package/src/stories/Atoms/Select/Select.stories.jsx +41 -0
- package/src/stories/Atoms/Slider/Slider.css +29 -0
- package/src/stories/Atoms/Slider/Slider.jsx +41 -0
- package/src/stories/Atoms/Slider/Slider.stories.jsx +41 -0
- package/src/stories/Atoms/Snackbar/Snackbar.css +29 -0
- package/src/stories/Atoms/Snackbar/Snackbar.jsx +41 -0
- package/src/stories/Atoms/Snackbar/Snackbar.stories.jsx +41 -0
- package/src/stories/Atoms/Spacer/Spacer.css +29 -0
- package/src/stories/Atoms/Spacer/Spacer.jsx +41 -0
- package/src/stories/Atoms/Spacer/Spacer.stories.jsx +41 -0
- package/src/stories/Atoms/Spinner/Spinner.css +29 -0
- package/src/stories/Atoms/Spinner/Spinner.jsx +41 -0
- package/src/stories/Atoms/Spinner/Spinner.stories.jsx +41 -0
- package/src/stories/Atoms/Tag/Tag.css +29 -0
- package/src/stories/Atoms/Tag/Tag.jsx +41 -0
- package/src/stories/Atoms/Tag/Tag.stories.jsx +41 -0
- package/src/stories/Atoms/TextArea/TextArea.css +29 -0
- package/src/stories/Atoms/TextArea/TextArea.jsx +41 -0
- package/src/stories/Atoms/TextArea/TextArea.stories.jsx +41 -0
- package/src/stories/Atoms/TextInput/TextInput.css +29 -0
- package/src/stories/Atoms/TextInput/TextInput.jsx +41 -0
- package/src/stories/Atoms/TextInput/TextInput.stories.jsx +41 -0
- package/src/stories/Atoms/Toggle/Toggle.css +29 -0
- package/src/stories/Atoms/Toggle/Toggle.jsx +41 -0
- package/src/stories/Atoms/Toggle/Toggle.stories.jsx +41 -0
- package/src/stories/Atoms/Tooltip/Tooltip.css +29 -0
- package/src/stories/Atoms/Tooltip/Tooltip.jsx +41 -0
- package/src/stories/Atoms/Tooltip/Tooltip.stories.jsx +41 -0
- package/src/stories/Atoms/Video/Video.css +29 -0
- package/src/stories/Atoms/Video/Video.jsx +41 -0
- package/src/stories/Atoms/Video/Video.stories.jsx +41 -0
- package/src/stories/Atoms/index.js +65 -0
- package/src/stories/Atoms/meta_Atoms.js +46 -0
- package/src/stories/Components.js +198 -0
- package/src/stories/Components.md +189 -0
- package/src/stories/Getting Started.mdx +239 -0
- package/src/stories/Layouts/Grid/Grid.css +4 -0
- package/src/stories/Layouts/Grid/Grid.jsx +15 -0
- package/src/stories/Layouts/Grid/Grid.stories.jsx +26 -0
- package/src/stories/Layouts/Layout.js +28 -0
- package/src/stories/MDX.mdx +118 -0
- package/src/stories/Miscellaneous/Miscellaneous.js +24 -0
- package/src/stories/Molecules/Accordion/Accordion.css +4 -0
- package/src/stories/Molecules/Accordion/Accordion.jsx +25 -0
- package/src/stories/Molecules/Accordion/Accordion.stories.jsx +20 -0
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.css +4 -0
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.jsx +25 -0
- package/src/stories/Molecules/AudioPlayer/AudioPlayer.stories.jsx +20 -0
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.css +4 -0
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.jsx +25 -0
- package/src/stories/Molecules/AvatarWithName/AvatarWithName.stories.jsx +20 -0
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.css +4 -0
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.jsx +25 -0
- package/src/stories/Molecules/Breadcrumbs/Breadcrumbs.stories.jsx +20 -0
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.css +4 -0
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.jsx +25 -0
- package/src/stories/Molecules/ButtonGroup/ButtonGroup.stories.jsx +20 -0
- package/src/stories/Molecules/Card/Card.css +4 -0
- package/src/stories/Molecules/Card/Card.jsx +25 -0
- package/src/stories/Molecules/Card/Card.stories.jsx +20 -0
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.css +4 -0
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.jsx +25 -0
- package/src/stories/Molecules/ComparisonTable/ComparisonTable.stories.jsx +20 -0
- package/src/stories/Molecules/DataTable/DataTable.css +4 -0
- package/src/stories/Molecules/DataTable/DataTable.jsx +25 -0
- package/src/stories/Molecules/DataTable/DataTable.stories.jsx +20 -0
- package/src/stories/Molecules/FileUpload/FileUpload.css +4 -0
- package/src/stories/Molecules/FileUpload/FileUpload.jsx +25 -0
- package/src/stories/Molecules/FileUpload/FileUpload.stories.jsx +20 -0
- package/src/stories/Molecules/FormField/FormField.css +4 -0
- package/src/stories/Molecules/FormField/FormField.jsx +25 -0
- package/src/stories/Molecules/FormField/FormField.stories.jsx +20 -0
- package/src/stories/Molecules/Header/Header.css +35 -0
- package/src/stories/Molecules/Header/Header.jsx +76 -0
- package/src/stories/Molecules/Header/Header.stories.jsx +28 -0
- package/src/stories/Molecules/IconButton/IconButton.css +4 -0
- package/src/stories/Molecules/IconButton/IconButton.jsx +25 -0
- package/src/stories/Molecules/IconButton/IconButton.stories.jsx +20 -0
- package/src/stories/Molecules/ImageWithCaption/ImageWithCaption.css +4 -0
- package/src/stories/Molecules/ImageWithCaption/ImageWithCaption.jsx +25 -0
- package/src/stories/Molecules/ImageWithCaption/ImageWithCaption.stories.jsx +20 -0
- package/src/stories/Molecules/InputGroup/InputGroup.css +4 -0
- package/src/stories/Molecules/InputGroup/InputGroup.jsx +25 -0
- package/src/stories/Molecules/InputGroup/InputGroup.stories.jsx +20 -0
- package/src/stories/Molecules/InputWithLabel/InputWithLabel.css +4 -0
- package/src/stories/Molecules/InputWithLabel/InputWithLabel.jsx +25 -0
- package/src/stories/Molecules/InputWithLabel/InputWithLabel.stories.jsx +20 -0
- package/src/stories/Molecules/List/List.css +4 -0
- package/src/stories/Molecules/List/List.jsx +25 -0
- package/src/stories/Molecules/List/List.stories.jsx +20 -0
- package/src/stories/Molecules/MediaCard/MediaCard.css +4 -0
- package/src/stories/Molecules/MediaCard/MediaCard.jsx +25 -0
- package/src/stories/Molecules/MediaCard/MediaCard.stories.jsx +20 -0
- package/src/stories/Molecules/Modal/Modal.css +4 -0
- package/src/stories/Molecules/Modal/Modal.jsx +25 -0
- package/src/stories/Molecules/Modal/Modal.stories.jsx +20 -0
- package/src/stories/Molecules/Molecules.js +44 -0
- package/src/stories/Molecules/Navbar/Navbar.css +87 -0
- package/src/stories/Molecules/Navbar/Navbar.jsx +87 -0
- package/src/stories/Molecules/Navbar/Navbar.stories.jsx +20 -0
- package/src/stories/Molecules/Notification/Notification.css +4 -0
- package/src/stories/Molecules/Notification/Notification.jsx +25 -0
- package/src/stories/Molecules/Notification/Notification.stories.jsx +20 -0
- package/src/stories/Molecules/PricingTable/PricingTable.css +4 -0
- package/src/stories/Molecules/PricingTable/PricingTable.jsx +25 -0
- package/src/stories/Molecules/PricingTable/PricingTable.stories.jsx +20 -0
- package/src/stories/Molecules/SearchBar/SearchBar.css +4 -0
- package/src/stories/Molecules/SearchBar/SearchBar.jsx +25 -0
- package/src/stories/Molecules/SearchBar/SearchBar.stories.jsx +20 -0
- package/src/stories/Molecules/SelectTheme/SelectTheme.css +25 -0
- package/src/stories/Molecules/SelectTheme/SelectTheme.jsx +44 -0
- package/src/stories/Molecules/SelectTheme/SelectTheme.stories.jsx +25 -0
- package/src/stories/Molecules/Sidebar/Sidebar.css +4 -0
- package/src/stories/Molecules/Sidebar/Sidebar.jsx +25 -0
- package/src/stories/Molecules/Sidebar/Sidebar.stories.jsx +20 -0
- package/src/stories/Molecules/VideoWithDescription/VideoWithDescription.css +4 -0
- package/src/stories/Molecules/VideoWithDescription/VideoWithDescription.jsx +25 -0
- package/src/stories/Molecules/VideoWithDescription/VideoWithDescription.stories.jsx +20 -0
- package/src/stories/Molecules/index.js +57 -0
- package/src/stories/Organisms/Organisms.js +39 -0
- package/src/stories/Organisms/Profile/UserFriends/UserFriends.context.jsx +15 -0
- package/src/stories/Organisms/Profile/UserFriends/UserFriends.css +4 -0
- package/src/stories/Organisms/Profile/UserFriends/UserFriends.jsx +13 -0
- package/src/stories/Organisms/Profile/UserFriends/UserFriends.stories.jsx +26 -0
- package/src/stories/Organisms/Profile/UserPosts/UserPosts.context.jsx +15 -0
- package/src/stories/Organisms/Profile/UserPosts/UserPosts.css +4 -0
- package/src/stories/Organisms/Profile/UserPosts/UserPosts.jsx +13 -0
- package/src/stories/Organisms/Profile/UserPosts/UserPosts.stories.jsx +26 -0
- package/src/stories/Organisms/Profile/UserProfile/UserProfile.context.jsx +15 -0
- package/src/stories/Organisms/Profile/UserProfile/UserProfile.css +4 -0
- package/src/stories/Organisms/Profile/UserProfile/UserProfile.jsx +13 -0
- package/src/stories/Organisms/Profile/UserProfile/UserProfile.stories.jsx +26 -0
- package/src/stories/Pages/Page/Page.css +69 -0
- package/src/stories/Pages/Page/Page.jsx +69 -0
- package/src/stories/Pages/Page/Page.stories.js +26 -0
- package/src/stories/Pages/Page/Pages.js +31 -0
- package/src/stories/Templates/Templates.js +27 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/styles/Header.modules.css +32 -0
- package/src/styles/global.css +59 -0
- package/src/themes/ThemeProvider.jsx +36 -0
- package/src/themes/Themes.js +44 -0
- package/src/themes/dark.js +22 -0
- package/src/themes/light.js +22 -0
- package/src/themes/typ/Readme.md +4 -0
- 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 +416 -0
- package/src/themes/typ/gothic/GUST e-foundry License.txt +29 -0
- 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 +410 -0
- 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 +622 -0
- package/src/themes/typ/night/codeblock.dark.css +113 -0
- package/src/themes/typ/night/credit.html +1 -0
- 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 +7 -0
- package/src/themes/typ/night/sourcemode.dark.css +38 -0
- package/src/themes/typ/night.css +1032 -0
- 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 +528 -0
- package/src/themes/typ/whitey.css +299 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* src/stories/Molecules/Navigation/Navbar/Navbar.css */
|
|
2
|
+
|
|
3
|
+
/* CSS variables for dynamic styling */
|
|
4
|
+
.navbar {
|
|
5
|
+
--navbar-background-color: rgba(34, 139, 34, 0); /* Light greenish background with low opacity */
|
|
6
|
+
--navbar-border-color: rgba(34, 139, 34, 0.235); /* Light border with dark greenish color and low opacity */
|
|
7
|
+
--navbar-padding: 8px 16px;
|
|
8
|
+
--navbar-margin: 16px;
|
|
9
|
+
--navbar-border-radius: 4px;
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
background-color: var(--navbar-background-color);
|
|
15
|
+
border: 1px solid var(--navbar-border-color);
|
|
16
|
+
padding: var(--navbar-padding);
|
|
17
|
+
margin: var(--navbar-margin);
|
|
18
|
+
border-radius: var(--navbar-border-radius);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.navbar__logo {
|
|
22
|
+
--navbar-logo-margin-right: 24px;
|
|
23
|
+
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
margin-right: var(--navbar-logo-margin-right);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.navbar__links {
|
|
30
|
+
list-style: none;
|
|
31
|
+
display: flex;
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.navbar__item {
|
|
37
|
+
--navbar-item-margin: 0 12px;
|
|
38
|
+
|
|
39
|
+
margin: var(--navbar-item-margin);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.navbar__link {
|
|
43
|
+
--navbar-link-color: #006400;
|
|
44
|
+
--navbar-link-padding: 8px;
|
|
45
|
+
|
|
46
|
+
color: var(--navbar-link-color);
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
padding: var(--navbar-link-padding);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.navbar__link:hover,
|
|
52
|
+
.navbar__link--active {
|
|
53
|
+
--navbar-link-hover-background-color: rgba(34, 139, 34, 0.1);
|
|
54
|
+
--navbar-link-hover-border-radius: 4px;
|
|
55
|
+
|
|
56
|
+
background-color: var(--navbar-link-hover-background-color);
|
|
57
|
+
border-radius: var(--navbar-link-hover-border-radius);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.navbar__controls {
|
|
61
|
+
--navbar-controls-margin-left: 24px;
|
|
62
|
+
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
margin-left: var(--navbar-controls-margin-left);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.navbar__controls > * {
|
|
69
|
+
--navbar-control-item-margin-left: 12px;
|
|
70
|
+
|
|
71
|
+
margin-left: var(--navbar-control-item-margin-left);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Button styles */
|
|
75
|
+
.button {
|
|
76
|
+
--button-background-color: #228B22;
|
|
77
|
+
--button-text-color: #fff;
|
|
78
|
+
|
|
79
|
+
background-color: var(--button-background-color);
|
|
80
|
+
color: var(--button-text-color);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.button:hover {
|
|
84
|
+
--button-hover-background-color: #1e7a1e;
|
|
85
|
+
|
|
86
|
+
background-color: var(--button-hover-background-color);
|
|
87
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// src/stories/Molecules/Navigation/Navbar/Navbar.jsx
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import './Navbar.css';
|
|
6
|
+
|
|
7
|
+
export const Navbar = ({
|
|
8
|
+
links,
|
|
9
|
+
logo,
|
|
10
|
+
userControls,
|
|
11
|
+
styleOverrides = {},
|
|
12
|
+
}) => {
|
|
13
|
+
// Build the style object for CSS variable overrides
|
|
14
|
+
const style = {};
|
|
15
|
+
|
|
16
|
+
// Map of styleOverrides keys to CSS variable names
|
|
17
|
+
const cssVariableMap = {
|
|
18
|
+
navbarBackgroundColor: '--navbar-background-color',
|
|
19
|
+
navbarBorderColor: '--navbar-border-color',
|
|
20
|
+
navbarPadding: '--navbar-padding',
|
|
21
|
+
navbarMargin: '--navbar-margin',
|
|
22
|
+
navbarBorderRadius: '--navbar-border-radius',
|
|
23
|
+
logoMarginRight: '--navbar-logo-margin-right',
|
|
24
|
+
itemMargin: '--navbar-item-margin',
|
|
25
|
+
linkColor: '--navbar-link-color',
|
|
26
|
+
linkPadding: '--navbar-link-padding',
|
|
27
|
+
linkHoverBackgroundColor: '--navbar-link-hover-background-color',
|
|
28
|
+
linkHoverBorderRadius: '--navbar-link-hover-border-radius',
|
|
29
|
+
controlsMarginLeft: '--navbar-controls-margin-left',
|
|
30
|
+
controlItemMarginLeft: '--navbar-control-item-margin-left',
|
|
31
|
+
buttonBackgroundColor: '--button-background-color',
|
|
32
|
+
buttonTextColor: '--button-text-color',
|
|
33
|
+
buttonHoverBackgroundColor: '--button-hover-background-color',
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// Set CSS variables based on styleOverrides
|
|
37
|
+
Object.keys(styleOverrides).forEach((key) => {
|
|
38
|
+
const cssVar = cssVariableMap[key];
|
|
39
|
+
if (cssVar) {
|
|
40
|
+
style[cssVar] = styleOverrides[key];
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<nav className="navbar" style={style}>
|
|
46
|
+
<div className="navbar__logo">
|
|
47
|
+
{logo}
|
|
48
|
+
</div>
|
|
49
|
+
<ul className="navbar__links">
|
|
50
|
+
{links.map((link, index) => (
|
|
51
|
+
<li key={index} className="navbar__item">
|
|
52
|
+
<a
|
|
53
|
+
href={link.url}
|
|
54
|
+
className={`navbar__link ${link.isActive ? 'navbar__link--active' : ''}`}
|
|
55
|
+
>
|
|
56
|
+
{link.label}
|
|
57
|
+
</a>
|
|
58
|
+
</li>
|
|
59
|
+
))}
|
|
60
|
+
</ul>
|
|
61
|
+
<div className="navbar__controls">
|
|
62
|
+
{userControls}
|
|
63
|
+
</div>
|
|
64
|
+
</nav>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
Navbar.propTypes = {
|
|
69
|
+
links: PropTypes.arrayOf(
|
|
70
|
+
PropTypes.shape({
|
|
71
|
+
url: PropTypes.string.isRequired,
|
|
72
|
+
label: PropTypes.string.isRequired,
|
|
73
|
+
isActive: PropTypes.bool,
|
|
74
|
+
})
|
|
75
|
+
).isRequired,
|
|
76
|
+
logo: PropTypes.node,
|
|
77
|
+
userControls: PropTypes.node,
|
|
78
|
+
styleOverrides: PropTypes.object,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
Navbar.defaultProps = {
|
|
82
|
+
logo: null,
|
|
83
|
+
userControls: null,
|
|
84
|
+
styleOverrides: {},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export default Navbar;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { Navbar } from './Navbar';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for Navbar component
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Molecules/Navigation/Navbar',
|
|
7
|
+
component: Navbar,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
// Define argTypes here
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
// Define default args here
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './Notification.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Notification component
|
|
8
|
+
*/
|
|
9
|
+
export const Notification = (props) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="notification" {...props}>
|
|
12
|
+
{/* Component implementation */}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
Notification.propTypes = {
|
|
18
|
+
// Define prop types here
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
Notification.defaultProps = {
|
|
22
|
+
// Define default props here
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default Notification;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { Notification } from './Notification';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for Notification component
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Molecules/FeedbackMolecules/Notification',
|
|
7
|
+
component: Notification,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
// Define argTypes here
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
// Define default args here
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './PricingTable.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* PricingTable component
|
|
8
|
+
*/
|
|
9
|
+
export const PricingTable = (props) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="pricingtable" {...props}>
|
|
12
|
+
{/* Component implementation */}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
PricingTable.propTypes = {
|
|
18
|
+
// Define prop types here
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
PricingTable.defaultProps = {
|
|
22
|
+
// Define default props here
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default PricingTable;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { PricingTable } from './PricingTable';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for PricingTable component
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Molecules/Tables/PricingTable',
|
|
7
|
+
component: PricingTable,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
// Define argTypes here
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
// Define default args here
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './SearchBar.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* SearchBar component
|
|
8
|
+
*/
|
|
9
|
+
export const SearchBar = (props) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="searchbar" {...props}>
|
|
12
|
+
{/* Component implementation */}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
SearchBar.propTypes = {
|
|
18
|
+
// Define prop types here
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
SearchBar.defaultProps = {
|
|
22
|
+
// Define default props here
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default SearchBar;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { SearchBar } from './SearchBar';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for SearchBar component
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Molecules/FormElements/SearchBar',
|
|
7
|
+
component: SearchBar,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
// Define argTypes here
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
// Define default args here
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.select-theme-container {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
align-items: center;
|
|
5
|
+
padding: 10px;
|
|
6
|
+
background-color: var(--bg-color, #f9f9f9); /* Use dynamic theme colors */
|
|
7
|
+
border-radius: 8px;
|
|
8
|
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.select-theme-label {
|
|
12
|
+
font-family: 'Roboto', sans-serif;
|
|
13
|
+
font-size: 16px;
|
|
14
|
+
color: var(--text-color, #333);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.select-theme-dropdown {
|
|
18
|
+
padding: 8px;
|
|
19
|
+
border-radius: 4px;
|
|
20
|
+
border: 1px solid var(--border-color, #ccc);
|
|
21
|
+
background-color: var(--bg-color, #fff);
|
|
22
|
+
color: var(--text-color, #333);
|
|
23
|
+
font-family: 'Roboto', sans-serif;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// src/stories/Molecules/SelectTheme/SelectTheme.jsx
|
|
2
|
+
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
|
+
import './SelectTheme.css'; // Import the component styles
|
|
5
|
+
|
|
6
|
+
const themes = [
|
|
7
|
+
{ label: 'GitHub', value: 'github' },
|
|
8
|
+
{ label: 'Gothic', value: 'gothic' },
|
|
9
|
+
{ label: 'Newsprint', value: 'newsprint' },
|
|
10
|
+
{ label: 'Night', value: 'night' },
|
|
11
|
+
{ label: 'Pixyll', value: 'pixyll' },
|
|
12
|
+
{ label: 'Whitey', value: 'whitey' }
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
export const SelectTheme = () => { // Named export
|
|
16
|
+
const [selectedTheme, setSelectedTheme] = useState('github'); // Default theme
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
import(`../../../themes/typ/${selectedTheme}.css`).then(() => {
|
|
20
|
+
console.log(`${selectedTheme} theme loaded`);
|
|
21
|
+
});
|
|
22
|
+
}, [selectedTheme]);
|
|
23
|
+
|
|
24
|
+
const handleThemeChange = (event) => {
|
|
25
|
+
setSelectedTheme(event.target.value);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<div className="select-theme-container">
|
|
30
|
+
<span className="select-theme-label">Select Theme:</span>
|
|
31
|
+
<select
|
|
32
|
+
className="select-theme-dropdown"
|
|
33
|
+
value={selectedTheme}
|
|
34
|
+
onChange={handleThemeChange}
|
|
35
|
+
>
|
|
36
|
+
{themes.map((theme) => (
|
|
37
|
+
<option key={theme.value} value={theme.value}>
|
|
38
|
+
{theme.label}
|
|
39
|
+
</option>
|
|
40
|
+
))}
|
|
41
|
+
</select>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import SelectTheme from './SelectTheme';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Molecules/ContentDisplay/SelectTheme',
|
|
6
|
+
component: SelectTheme,
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: 'SelectTheme allows the user to switch between different CSS themes dynamically.',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const Template = (args) => <SelectTheme {...args} />;
|
|
17
|
+
|
|
18
|
+
export const Default = Template.bind({});
|
|
19
|
+
Default.args = {
|
|
20
|
+
// You can pass default props here if needed, though SelectTheme doesn't take any props directly.
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
Default.story = {
|
|
24
|
+
name: 'Default',
|
|
25
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './Sidebar.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Sidebar component
|
|
8
|
+
*/
|
|
9
|
+
export const Sidebar = (props) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="sidebar" {...props}>
|
|
12
|
+
{/* Component implementation */}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
Sidebar.propTypes = {
|
|
18
|
+
// Define prop types here
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
Sidebar.defaultProps = {
|
|
22
|
+
// Define default props here
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default Sidebar;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { Sidebar } from './Sidebar';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for Sidebar component
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Molecules/Navigation/Sidebar',
|
|
7
|
+
component: Sidebar,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
// Define argTypes here
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
// Define default args here
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import './VideoWithDescription.css';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* VideoWithDescription component
|
|
8
|
+
*/
|
|
9
|
+
export const VideoWithDescription = (props) => {
|
|
10
|
+
return (
|
|
11
|
+
<div className="videowithdescription" {...props}>
|
|
12
|
+
{/* Component implementation */}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
VideoWithDescription.propTypes = {
|
|
18
|
+
// Define prop types here
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
VideoWithDescription.defaultProps = {
|
|
22
|
+
// Define default props here
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default VideoWithDescription;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
import { VideoWithDescription } from './VideoWithDescription';
|
|
3
|
+
|
|
4
|
+
// Storybook configuration for VideoWithDescription component
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Molecules/MediaMolecules/VideoWithDescription',
|
|
7
|
+
component: VideoWithDescription,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
// Define argTypes here
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
// Define default args here
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// src/stories/Molecules/index.js
|
|
2
|
+
|
|
3
|
+
// Import all components as named exports
|
|
4
|
+
import { Navbar } from './Navbar/Navbar';
|
|
5
|
+
import { Sidebar } from './Sidebar/Sidebar';
|
|
6
|
+
import { Breadcrumbs } from './Breadcrumbs/Breadcrumbs';
|
|
7
|
+
import { InputGroup } from './InputGroup/InputGroup';
|
|
8
|
+
import { InputWithLabel } from './InputWithLabel/InputWithLabel';
|
|
9
|
+
import { SearchBar } from './SearchBar/SearchBar';
|
|
10
|
+
import { FileUpload } from './FileUpload/FileUpload';
|
|
11
|
+
import { FormField } from './FormField/FormField';
|
|
12
|
+
import { IconButton } from './IconButton/IconButton';
|
|
13
|
+
import { ButtonGroup } from './ButtonGroup/ButtonGroup';
|
|
14
|
+
import { ImageWithCaption } from './ImageWithCaption/ImageWithCaption';
|
|
15
|
+
import { VideoWithDescription } from './VideoWithDescription/VideoWithDescription';
|
|
16
|
+
import { AvatarWithName } from './AvatarWithName/AvatarWithName';
|
|
17
|
+
import { AudioPlayer } from './AudioPlayer/AudioPlayer';
|
|
18
|
+
import { Card } from './Card/Card';
|
|
19
|
+
import { MediaCard } from './MediaCard/MediaCard';
|
|
20
|
+
import { List } from './List/List';
|
|
21
|
+
import { Accordion } from './Accordion/Accordion';
|
|
22
|
+
import { Notification } from './Notification/Notification';
|
|
23
|
+
import { Modal } from './Modal/Modal';
|
|
24
|
+
import { DataTable } from './DataTable/DataTable';
|
|
25
|
+
import { PricingTable } from './PricingTable/PricingTable';
|
|
26
|
+
import { ComparisonTable } from './ComparisonTable/ComparisonTable';
|
|
27
|
+
import { SelectTheme } from './SelectTheme/SelectTheme';
|
|
28
|
+
|
|
29
|
+
// Flattened export of all components
|
|
30
|
+
const Molecules = {
|
|
31
|
+
Navbar,
|
|
32
|
+
Sidebar,
|
|
33
|
+
Breadcrumbs,
|
|
34
|
+
InputGroup,
|
|
35
|
+
InputWithLabel,
|
|
36
|
+
SearchBar,
|
|
37
|
+
SelectTheme,
|
|
38
|
+
FileUpload,
|
|
39
|
+
FormField,
|
|
40
|
+
IconButton,
|
|
41
|
+
ButtonGroup,
|
|
42
|
+
ImageWithCaption,
|
|
43
|
+
VideoWithDescription,
|
|
44
|
+
AvatarWithName,
|
|
45
|
+
AudioPlayer,
|
|
46
|
+
Card,
|
|
47
|
+
MediaCard,
|
|
48
|
+
List,
|
|
49
|
+
Accordion,
|
|
50
|
+
Notification,
|
|
51
|
+
Modal,
|
|
52
|
+
DataTable,
|
|
53
|
+
PricingTable,
|
|
54
|
+
ComparisonTable,
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export default Molecules;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const organisms = {
|
|
2
|
+
"Organisms": {
|
|
3
|
+
"Forms": [
|
|
4
|
+
{ name: "SignInForm", paths: { css: "./SignInForm/SignInForm.css", globalCss: "styles/global.css", jsx: "./SignInForm/SignInForm.jsx", stories: "./SignInForm/SignInForm.stories.jsx" }},
|
|
5
|
+
{ name: "RegistrationForm", paths: { css: "./RegistrationForm/RegistrationForm.css", globalCss: "styles/global.css", jsx: "./RegistrationForm/RegistrationForm.jsx", stories: "./RegistrationForm/RegistrationForm.stories.jsx" }},
|
|
6
|
+
{ name: "ContactForm", paths: { css: "./ContactForm/ContactForm.css", globalCss: "styles/global.css", jsx: "./ContactForm/ContactForm.jsx", stories: "./ContactForm/ContactForm.stories.jsx" }},
|
|
7
|
+
],
|
|
8
|
+
|
|
9
|
+
"ContentDisplay": [
|
|
10
|
+
{ name: "ProfileCard", paths: { css: "./ProfileCard/ProfileCard.css", globalCss: "styles/global.css", jsx: "./ProfileCard/ProfileCard.jsx", stories: "./ProfileCard/ProfileCard.stories.jsx" }},
|
|
11
|
+
{ name: "ProductDetail", paths: { css: "./ProductDetail/ProductDetail.css", globalCss: "styles/global.css", jsx: "./ProductDetail/ProductDetail.jsx", stories: "./ProductDetail/ProductDetail.stories.jsx" }},
|
|
12
|
+
{ name: "ArticleContent", paths: { css: "./ArticleContent/ArticleContent.css", globalCss: "styles/global.css", jsx: "./ArticleContent/ArticleContent.jsx", stories: "./ArticleContent/ArticleContent.stories.jsx" }},
|
|
13
|
+
],
|
|
14
|
+
|
|
15
|
+
"MediaCollections": [
|
|
16
|
+
{ name: "ImageGallery", paths: { css: "./ImageGallery/ImageGallery.css", globalCss: "styles/global.css", jsx: "./ImageGallery/ImageGallery.jsx", stories: "./ImageGallery/ImageGallery.stories.jsx" }},
|
|
17
|
+
{ name: "VideoPlaylist", paths: { css: "./VideoPlaylist/VideoPlaylist.css", globalCss: "styles/global.css", jsx: "./VideoPlaylist/VideoPlaylist.jsx", stories: "./VideoPlaylist/VideoPlaylist.stories.jsx" }},
|
|
18
|
+
{ name: "Carousel", paths: { css: "./Carousel/Carousel.css", globalCss: "styles/global.css", jsx: "./Carousel/Carousel.jsx", stories: "./Carousel/Carousel.stories.jsx" }},
|
|
19
|
+
],
|
|
20
|
+
|
|
21
|
+
"Interactive": [
|
|
22
|
+
{ name: "ShoppingCart", paths: { css: "./ShoppingCart/ShoppingCart.css", globalCss: "styles/global.css", jsx: "./ShoppingCart/ShoppingCart.jsx", stories: "./ShoppingCart/ShoppingCart.stories.jsx" }},
|
|
23
|
+
{ name: "UserProfile", paths: { css: "./UserProfile/UserProfile.css", globalCss: "styles/global.css", jsx: "./UserProfile/UserProfile.jsx", stories: "./UserProfile/UserProfile.stories.jsx" }},
|
|
24
|
+
{ name: "Checkout", paths: { css: "./Checkout/Checkout.css", globalCss: "styles/global.css", jsx: "./Checkout/Checkout.jsx", stories: "./Checkout/Checkout.stories.jsx" }},
|
|
25
|
+
],
|
|
26
|
+
|
|
27
|
+
"MediaCollections": [
|
|
28
|
+
{ name: "ImageGallery", paths: { css: "./ImageGallery/ImageGallery.css", globalCss: "styles/global.css", jsx: "./ImageGallery/ImageGallery.jsx", stories: "./ImageGallery/ImageGallery.stories.jsx" }},
|
|
29
|
+
{ name: "VideoPlaylist", paths: { css: "./VideoPlaylist/VideoPlaylist.css", globalCss: "styles/global.css", jsx: "./VideoPlaylist/VideoPlaylist.jsx", stories: "./VideoPlaylist/VideoPlaylist.stories.jsx" }},
|
|
30
|
+
{ name: "Carousel", paths: { css: "./Carousel/Carousel.css", globalCss: "styles/global.css", jsx: "./Carousel/Carousel.jsx", stories: "./Carousel/Carousel.stories.jsx" }},
|
|
31
|
+
],
|
|
32
|
+
|
|
33
|
+
"Feedback": [
|
|
34
|
+
{ name: "UserNotification", paths: { css: "./UserNotification/UserNotification.css", globalCss: "styles/global.css", jsx: "./UserNotification/UserNotification.jsx", stories: "./UserNotification/UserNotification.stories.jsx" }},
|
|
35
|
+
{ name: "StatusBanner", paths: { css: "./StatusBanner/StatusBanner.css", globalCss: "styles/global.css", jsx: "./StatusBanner/StatusBanner.jsx", stories: "./StatusBanner/StatusBanner.stories.jsx" }},
|
|
36
|
+
{ name: "AlertSystem", paths: { css: "./AlertSystem/AlertSystem.css", globalCss: "styles/global.css", jsx: "./AlertSystem/AlertSystem.jsx", stories: "./AlertSystem/AlertSystem.stories.jsx" }},
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
import React, { createContext, useContext, useState } from 'react';
|
|
3
|
+
|
|
4
|
+
const UserFriendsContext = createContext();
|
|
5
|
+
|
|
6
|
+
export const UserFriendsProvider = ({ children }) => {
|
|
7
|
+
const [state, setState] = useState(null);
|
|
8
|
+
return (
|
|
9
|
+
<UserFriendsContext.Provider value={[state, setState]}>
|
|
10
|
+
{children}
|
|
11
|
+
</UserFriendsContext.Provider>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const useUserFriends = () => useContext(UserFriendsContext);
|