hw10 styles

This commit is contained in:
2022-07-12 18:07:44 +02:00
parent 0c79ee445c
commit 7a86194a4b
4 changed files with 38 additions and 14 deletions

View File

@@ -7,7 +7,6 @@ import HW13 from '../../hw13/HW13'
function JuniorPlus() { function JuniorPlus() {
return ( return (
<div id={'hw5-page-junior-plus'}> <div id={'hw5-page-junior-plus'}>
junior plus page
<HW10 /> <HW10 />
<HW11 /> <HW11 />
<HW12 /> <HW12 />

View File

@@ -4,6 +4,7 @@ import { AppStoreType } from './bll/store'
import { loadingAC } from './bll/loadingReducer' import { loadingAC } from './bll/loadingReducer'
import SuperButton from '../hw04/common/c2-SuperButton/SuperButton' import SuperButton from '../hw04/common/c2-SuperButton/SuperButton'
import s2 from '../../s1-main/App.module.css' import s2 from '../../s1-main/App.module.css'
import { Loader } from './Loader'
const HW10 = () => { const HW10 = () => {
// useSelector, useDispatch // useSelector, useDispatch
@@ -24,22 +25,26 @@ const HW10 = () => {
} }
return ( return (
<div id={'hw10'} className={s2.hw}> <div id={'hw10'}>
<div className={s2.hwTitle}>homeworks 10</div> <div className={s2.hwTitle}>homeworks 10</div>
{/*should work (должно работать)*/} {/*should work (должно работать)*/}
{isLoading ? ( <div className={s2.hw}>
<div id={'hw10-loading'}>крутилка...</div> {isLoading ? (
) : ( <div id={'hw10-loading'}>
<div> <Loader />
<SuperButton </div>
id={'hw10-button-start-loading'} ) : (
onClick={setLoading} <div>
> <SuperButton
set loading... id={'hw10-button-start-loading'}
</SuperButton> onClick={setLoading}
</div> >
)} Set loading...
</SuperButton>
</div>
)}
</div>
</div> </div>
) )
} }

View File

@@ -0,0 +1,17 @@
.loader {
border: 9px solid #f3f3f3;
border-top: 9px solid #512DE4;
border-radius: 50%;
width: 90px;
height: 90px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

View File

@@ -0,0 +1,3 @@
import s from './Loader.module.css'
export const Loader = () => <div className={s.loader}></div>