logout, hover transition and small fixes

This commit is contained in:
kurpfish
2021-08-09 15:10:12 +03:00
parent 5880137dd8
commit f0a92fd8f2
20 changed files with 218 additions and 39 deletions

View File

@ -0,0 +1,14 @@
import React from 'react';
import { useDispatch } from 'react-redux';
import { auth } from '../../redux/outstaffingSlice';
import './logoutButton.css'
export const LogoutButton = () => {
const dispatch = useDispatch();
return (
<div className='logout-button' onClick={()=>{localStorage.clear(); dispatch(auth(false));}}>
<button>Выйти</button>
</div>
)
}

View File

@ -0,0 +1,30 @@
.logout-button {
position: fixed;
top: 2rem;
right: 3.5rem;
z-index: 100;
}
.logout-button button {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
padding: 1rem 2rem;
border-radius: 20px;
background-color: #6aaf5c;
color: #ffffff;
border: 2px solid #6aaf5c;
font-family: 'Muller';
font-size: 2em;
letter-spacing: normal;
text-align: center;
}
.logout-button:hover button {
background-color: #ffffff;
color: #6aaf5c;
border: 2px solid #6aaf5c;
box-shadow: 3px 2px 5px rgba(82, 151, 34, 0.21);
transition: .3s;
}