logout, hover transition and small fixes
This commit is contained in:
14
src/components/LogoutButton/LogoutButton.js
Normal file
14
src/components/LogoutButton/LogoutButton.js
Normal 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>
|
||||
)
|
||||
}
|
30
src/components/LogoutButton/logoutButton.css
Normal file
30
src/components/LogoutButton/logoutButton.css
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user