diff --git a/public/favicon.ico b/public/favicon.ico index 6f7cda2..c5da94c 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/logo192.png b/public/logo192.png deleted file mode 100644 index fc44b0a..0000000 Binary files a/public/logo192.png and /dev/null differ diff --git a/public/logo512.png b/public/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/public/logo512.png and /dev/null differ diff --git a/src/components/Dialogs/NewRestaurant.js b/src/components/Dialogs/NewRestaurant.js index 3d57bf4..50ef6ae 100644 --- a/src/components/Dialogs/NewRestaurant.js +++ b/src/components/Dialogs/NewRestaurant.js @@ -16,6 +16,7 @@ import StepLabel from "@material-ui/core/StepLabel"; import Paper from "@material-ui/core/Paper"; import Autocomplete from "@material-ui/lab/Autocomplete"; import InputAdornment from "@material-ui/core/InputAdornment"; +import validator from "validator"; // ICONS import FastfoodIcon from "@material-ui/icons/Fastfood"; import LocationCityIcon from "@material-ui/icons/LocationCity"; @@ -23,6 +24,9 @@ import PhoneIcon from "@material-ui/icons/Phone"; import FacebookIcon from "@material-ui/icons/Facebook"; import TwitterIcon from "@material-ui/icons/Twitter"; import LanguageIcon from "@material-ui/icons/Language"; +import ButtonPrimary from "../Input/ButtonPrimary"; + +// SETUP const useStyles = makeStyles((theme) => ({ root: { @@ -81,9 +85,15 @@ export default function NewRestaurant() { const initialState = { name: "", city: "", + adress: "", hoursFrom: "", hoursTo: "", description: "", + tags: [], + phone: "", + facebook: "", + twitter: "", + www: "", }; const steps = ["Informacje", "Zdjęcie", "Lokalizacja"]; const [state, setState] = useState(initialState); @@ -101,6 +111,22 @@ export default function NewRestaurant() { "Dowozimy", ]; + // HANDLERS + + const handleNextButton = () => { + if (activeStep < 2) { + setActiveStep(activeStep + 1); + console.log(activeStep); + } + }; + + const handlePreviousButton = () => { + setActiveStep(activeStep - 1); + console.log(activeStep); + }; + + // COMPONENTS + return (
))} - -
- - (state.restaurantName = event.target.value) - } - InputProps={{ - startAdornment: ( - - - - ), - }} - /> - - (state.restaurantName = event.target.value) - } - InputProps={{ - startAdornment: ( - - - - ), - }} - /> - (state.hoursFrom = event.target.value)} - variant="outlined" - className={styles.timePicker} - InputLabelProps={{ - shrink: true, - }} - inputProps={{ - step: 300, // 5 min - }} - /> - (state.hoursTo = event.target.value)} - variant="outlined" - className={styles.timePicker} - InputLabelProps={{ - shrink: true, - }} - inputProps={{ - step: 300, // 5 min - }} - /> + + {activeStep === 0 && ( +
- ( - - )} + onChange={(event) => (state.name = event.target.value)} + InputProps={{ + startAdornment: ( + + + + ), + }} />
- - (state.restaurantName = event.target.value) - } - InputProps={{ - startAdornment: ( - - - - ), - }} - /> - - (state.restaurantName = event.target.value) - } - InputProps={{ - startAdornment: ( - - - - ), - }} - /> - - (state.restaurantName = event.target.value) - } - InputProps={{ - startAdornment: ( - - - - ), - }} - /> - - (state.restaurantName = event.target.value) - } - InputProps={{ - startAdornment: ( - - - - ), - }} - /> -
-
- +
+ (state.city = event.target.value)} + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + (state.adress = event.target.value)} + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + (state.hoursFrom = event.target.value)} + variant="outlined" + className={styles.timePicker} + InputLabelProps={{ + shrink: true, + }} + inputProps={{ + step: 300, // 5 min + }} + /> + (state.hoursTo = event.target.value)} + variant="outlined" + className={styles.timePicker} + InputLabelProps={{ + shrink: true, + }} + inputProps={{ + step: 300, // 5 min + }} + /> +
+ + (state.description = event.target.value) + } + multiline + rows={3} + variant="outlined" + /> + + setState({ ...state, tags: values }) + } + renderInput={(params) => ( + + )} + /> +
+ (state.phone = event.target.value)} + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + (state.facebook = event.target.value)} + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + (state.twitter = event.target.value)} + InputProps={{ + startAdornment: ( + + + + ), + }} + /> + (state.www = event.target.value)} + InputProps={{ + startAdornment: ( + + + + ), + }} + /> +
+ + )} + {activeStep !== 0 && ( + + )} +
diff --git a/src/components/Input/ButtonPrimary.js b/src/components/Input/ButtonPrimary.js index 4b3fbc3..ee4ab6e 100644 --- a/src/components/Input/ButtonPrimary.js +++ b/src/components/Input/ButtonPrimary.js @@ -4,13 +4,12 @@ import Button from "@material-ui/core/Button"; const StyledButton = withStyles({ root: { - background: "none", - color: "white", - border: "solid 1px white", + backgroundColor: "#696969", + color: "#262626", margin: "16px 16px 16px 0px", padding: "8px 12px 8px 12px", "&:hover": { - color: "white", + backgroundColor: "#808080", }, }, label: { @@ -19,5 +18,5 @@ const StyledButton = withStyles({ })(Button); export default function ButtonPrimary(props) { - return {props.text}; + return {props.text}; }