I hereby claim:
- I am surfer19 on github.
- I am majkoo (https://keybase.io/majkoo) on keybase.
- I have a public key ASCkq5oKvNgqqf70TgF00uUTVCV3LdeTzhYEjUKF_mMzHwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<h2 class="n1">Nestrácaj</h2> | |
<h2 class="n2">čas</h2> | |
<h2 class="n3">hľadaním!</h2> | |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1920 1080.84"> | |
<defs> | |
<clipPath id="clip-path"> | |
<rect x="609.64" y="285.74" width="366.84" height="212.04" style="fill: none"/> | |
</clipPath> | |
<linearGradient id="linear-gradient" x1="479.07" y1="426.39" x2="525.76" y2="600.63" gradientUnits="userSpaceOnUse"> | |
<stop offset="0" stop-color="#f1c40f"/> |
Color themes gives you oportunity to style some basic elements without writing css code. | |
Color themes for sections: | |
GREY | |
<section class="section-grey" id="..."> | |
CYAN | |
<section class="section-cyan" id="..."> |
import React from "react"; | |
import { useStep } from "react-hooks-helper"; | |
import { Step1 } from "./views/Step1"; | |
import { Step2 } from "./views/Step2"; | |
const steps = [{ id: "step1" }, { id: "step2" }]; | |
export const RegistrationFormStepper = () => { | |
const { step, navigation } = useStep({ initialStep: 0, steps }); | |
const props = { navigation }; |
// context/global-context.jsx | |
export const reducer = (state, action) => { | |
switch (action.type) { | |
case "SAVE_LOGIN_INFO": | |
return { | |
...state, | |
email: action.email, | |
password: action.password | |
}; | |
case "SAVE_PERSONAL_INFO": |
// global-context.jsx | |
export const GlobalContextProvider = (props) => { | |
const [state, dispatch] = useReducer(reducer, initialState); | |
return ( | |
<GlobalContext.Provider value={[state, dispatch]}> | |
{props.children} | |
</GlobalContext.Provider> | |
); | |
}; |
<GlobalContextProvider>{…components}</GlobalContextProvider> |
// App.jsx | |
import React from "react"; | |
import "bootstrap/dist/css/bootstrap.min.css"; | |
import "./styles.scss"; | |
import { RegistrationFormStepper } from "./RegistrationFormStepper"; | |
import { GlobalContextProvider } from "./context/global-context"; | |
export default function App() { | |
return ( | |
<div className="App mt-4"> |
// views/Step1.jsx | |
import React, { useContext, useState } from "react"; | |
import { GlobalContext } from "../context/global-context"; | |
export const Step1 = ({ navigation }) => { | |
const { next } = navigation; | |
const [state, dispatch] = useContext(GlobalContext); | |
const [email, setEmail] = useState(state.email || ""); | |
const [password, setPassword] = useState(state.password || ""); |