diff --git a/package-lock.json b/package-lock.json index 5976b9f..7c5ff34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "nanoid": "^3.3.4", "react": "^18.0.0", "react-dom": "^18.0.0", + "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "rsuite": "^5.8.1", "web-vitals": "^2.1.4" @@ -8032,6 +8033,14 @@ "he": "bin/he" } }, + "node_modules/history": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", + "integrity": "sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==", + "dependencies": { + "@babel/runtime": "^7.7.6" + } + }, "node_modules/hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -13269,6 +13278,30 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.3.0.tgz", + "integrity": "sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==", + "dependencies": { + "history": "^5.2.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.3.0.tgz", + "integrity": "sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==", + "dependencies": { + "history": "^5.2.0", + "react-router": "6.3.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", @@ -21826,6 +21859,14 @@ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, + "history": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/history/-/history-5.3.0.tgz", + "integrity": "sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==", + "requires": { + "@babel/runtime": "^7.7.6" + } + }, "hoopy": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz", @@ -25465,6 +25506,23 @@ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==" }, + "react-router": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.3.0.tgz", + "integrity": "sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==", + "requires": { + "history": "^5.2.0" + } + }, + "react-router-dom": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.3.0.tgz", + "integrity": "sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==", + "requires": { + "history": "^5.2.0", + "react-router": "6.3.0" + } + }, "react-scripts": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.1.tgz", diff --git a/package.json b/package.json index 3a9bba3..b02634c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "nanoid": "^3.3.4", "react": "^18.0.0", "react-dom": "^18.0.0", + "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "rsuite": "^5.8.1", "web-vitals": "^2.1.4" diff --git a/src/App.js b/src/App.js index bed7f3b..2f694aa 100644 --- a/src/App.js +++ b/src/App.js @@ -1,9 +1,21 @@ + +import React from "react"; +import { Route, Routes, Navigate } from "react-router-dom"; + import Page from "./components/Page"; import "./App.css"; +import Main from "./components/Main"; + const App = () => { return (
Hey
; +}; + +// const Button = ({ +// variant, +// text, +// disableShadow, +// states, +// disabled, +// size, +// color, +// startIcon, +// endIcon, +// children +// }) => { +// return ( +// +// ); +// }; + +export default Button; diff --git a/src/components/Button/Button.module.css b/src/components/Button/Button.module.css new file mode 100644 index 0000000..2c935ed --- /dev/null +++ b/src/components/Button/Button.module.css @@ -0,0 +1,109 @@ +.button { + padding: 0.5rem 1rem; + justify-content: center; + align-items: center; + font-size: 1rem; + font-family: "Noto Sans", sans-serif; + border: none; + background: #e0e0e0; + border-radius: 0.5rem; + box-shadow: 0px 2px 3px rgba(51, 51, 51, 0.2); + display: flex; + cursor: pointer; +} +.button:hover, +.button:focus, +.button.active { + background: #aeaeae; +} + +.disableShadow { + box-shadow: none; +} + +button:disabled { + color: #9e9e9e; + cursor: default; +} +.show-grid small { + min-height: 50px; + display: inline-block; +} + +.xs { + padding: 0.25rem 0.5rem; +} +.sm { + padding: 0.375rem 0.75rem; +} + +.md { + padding: 0.5rem 1rem; +} + +.lg { + padding: 0.6875rem 1.375rem; +} + +.default { + background-color: #eee; + color: rgb(95, 92, 92); + border: 1px solid #e0e0e0; +} + +.primary { + color: white; + background-color: #2962ff; + border: 1px solid #3d5afe; +} + +.secondary { + color: white; + background-color: #455a64; + border: 1px solid #9ca4a8; +} + +.caps { + text-transform: capitalize; + padding: 2px; +} +.danger { + color: white; + background-color: #d32f2f; + border: 1px solid #ec7575; +} + +.outline { + background: none !important; + box-shadow: none; + color: #828282; +} + +.primary.outline { + color: #2962ff; +} + +.danger.outline { + color: #d32f2f; +} + +.secondary.outline { + color: #455a64; +} + +.text { + background: transparent !important; + border: 0px !important; + color: #828282; + box-shadow: none; +} + +.raw-code { + display: block; + height: 40px; +} + +.materialIcons { + font-size: 14px; + margin: 0 0.5rem; +} diff --git a/src/components/Button/ButtonType.js b/src/components/Button/ButtonType.js new file mode 100644 index 0000000..74f2f11 --- /dev/null +++ b/src/components/Button/ButtonType.js @@ -0,0 +1,34 @@ +import Button from "./Button"; +import { FlexboxGrid, Divider } from "rsuite"; +import { nanoid } from "nanoid"; + +let styleObj = { + display: "block", + height: "40px" +}; + +const ButtonType = ({ title, types, set }) => { + console.log(types[set], "types"); + let item = {}; + // let item = {`${set}`:"someString", "dynamicKey2":"someString"}; + return ( +