diff --git a/React/comp_library/package-lock.json b/React/comp_library/package-lock.json index d8bf350..37b6b93 100644 --- a/React/comp_library/package-lock.json +++ b/React/comp_library/package-lock.json @@ -8,6 +8,7 @@ "name": "storybook", "version": "0.1.0", "dependencies": { + "@chakra-ui/icons": "^2.1.1", "@chakra-ui/react": "^2.8.2", "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", @@ -28,7 +29,6 @@ "@storybook/addon-essentials": "^8.2.8", "@storybook/addon-interactions": "^8.2.8", "@storybook/addon-links": "^8.2.8", - "@storybook/addon-onboarding": "^8.2.8", "@storybook/blocks": "^8.2.8", "@storybook/preset-create-react-app": "^8.2.8", "@storybook/react": "^8.2.8", @@ -2445,6 +2445,18 @@ "react": ">=18" } }, + "node_modules/@chakra-ui/icons": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@chakra-ui/icons/-/icons-2.1.1.tgz", + "integrity": "sha512-3p30hdo4LlRZTT5CwoAJq3G9fHI0wDc0pBaMHj4SUn0yomO+RcDRlzhdXqdr5cVnzax44sqXJVnf3oQG0eI+4g==", + "dependencies": { + "@chakra-ui/icon": "3.2.0" + }, + "peerDependencies": { + "@chakra-ui/system": ">=2.0.0", + "react": ">=18" + } + }, "node_modules/@chakra-ui/image": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@chakra-ui/image/-/image-2.1.0.tgz", @@ -6330,22 +6342,6 @@ "storybook": "^8.2.8" } }, - "node_modules/@storybook/addon-onboarding": { - "version": "8.2.8", - "resolved": "https://registry.npmjs.org/@storybook/addon-onboarding/-/addon-onboarding-8.2.8.tgz", - "integrity": "sha512-fKy3uwggIZKFQL9qo4niVYnAhMAdO/xBsEzJNj2ueTaWoJYO6c0jDWhVQW3pxlMw6yq/WdYT6tW/lsbHKFBUVQ==", - "dev": true, - "dependencies": { - "react-confetti": "^6.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "peerDependencies": { - "storybook": "^8.2.8" - } - }, "node_modules/@storybook/addon-outline": { "version": "8.2.8", "resolved": "https://registry.npmjs.org/@storybook/addon-outline/-/addon-outline-8.2.8.tgz", diff --git a/React/comp_library/package.json b/React/comp_library/package.json index 223eec5..a175504 100644 --- a/React/comp_library/package.json +++ b/React/comp_library/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { + "@chakra-ui/icons": "^2.1.1", "@chakra-ui/react": "^2.8.2", "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", diff --git a/React/comp_library/src/components/Button.tsx b/React/comp_library/src/components/Button.tsx deleted file mode 100644 index 5ab22f4..0000000 --- a/React/comp_library/src/components/Button.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import * as React from 'react'; - -interface ButtonProps { - /** - * Is this the principal call to action on the page? - */ - primary?: boolean; - /** - * What background color to use - */ - backgroundColor?: string; - /** - * How large should the button be? - */ - size?: 'small' | 'medium' | 'large'; - /** - * Button contents - */ - label: string; - /** - * Optional click handler - */ - onClick?: () => void; -} - -export const Button: React.FC = ({ - primary = false, - size = 'medium', - backgroundColor, - label, - onClick, - ...props -}) => { - const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; - return ( - - ); -}; \ No newline at end of file diff --git a/React/comp_library/src/components/CaseStudy.tsx b/React/comp_library/src/components/CaseStudy.tsx new file mode 100644 index 0000000..cd28733 --- /dev/null +++ b/React/comp_library/src/components/CaseStudy.tsx @@ -0,0 +1,55 @@ +import { Box, Fade, Heading, Image, Text } from "@chakra-ui/react"; +import { motion } from "framer-motion"; +import React from "react"; + +const MotionHeading = motion(Heading); +const MotionText = motion(Text); + +type SectionType = { + heading: string; + content: string;} + +const CaseStudy = ({ sections }: { sections: SectionType[] }) => { + return ( + + Illustration + + {sections.map((section, index) => ( + + + + {section.heading} + + + {section.content} + + + + ))} + + ); +}; + +export default CaseStudy; diff --git a/React/comp_library/src/components/ColorModeToggle.tsx b/React/comp_library/src/components/ColorModeToggle.tsx new file mode 100644 index 0000000..476ae7d --- /dev/null +++ b/React/comp_library/src/components/ColorModeToggle.tsx @@ -0,0 +1,46 @@ +import { MoonIcon, SunIcon } from "@chakra-ui/icons"; +import { + AbsoluteCenter, + FormControl, + FormLabel, + Switch, + useColorMode, + useColorModeValue, +} from "@chakra-ui/react"; +import * as React from "react"; + +export default function ColorModeToggle() { + const { colorMode, toggleColorMode } = useColorMode(); + const icon_color = useColorModeValue( + "colors.brand.secondary.900", + "colors.brand.primary.900", + ); + return ( + + + + + {colorMode === "light" ? ( + + ) : ( + + )} + + + + ); +} diff --git a/React/comp_library/src/components/ContactForm.tsx b/React/comp_library/src/components/ContactForm.tsx new file mode 100644 index 0000000..655a5f0 --- /dev/null +++ b/React/comp_library/src/components/ContactForm.tsx @@ -0,0 +1,95 @@ +import { + Box, + Button, + FormControl, + FormLabel, + Heading, + Input, + InputGroup, + InputLeftElement, + Textarea, + VStack, +} from "@chakra-ui/react"; +import React from "react"; +import { BsPerson } from "react-icons/bs/index.js"; +import { MdOutlineEmail } from "react-icons/md/index.js"; + +export default function ContactForm() { + return ( + + Contact Us +
+ + + + + {/** + * Hi, My name is *Name*, working at *company* as the *title*; We would like to *issues*. Contact me at *email/phone* + */} + + + Your Name + + } + /> + + + + + E-Mail + + } + /> + + + {/* + We'll never share your email. + */} + + + Message +