|
@@ -16,16 +16,16 @@ const Nav = styled.button`
|
|
|
box-shadow: 0 0px 10px rgba(100, 100, 100, 0.1);
|
|
box-shadow: 0 0px 10px rgba(100, 100, 100, 0.1);
|
|
|
transition: all 0.2s ease-out;
|
|
transition: all 0.2s ease-out;
|
|
|
|
|
|
|
|
- ${({ active }) =>
|
|
|
|
|
- active &&
|
|
|
|
|
|
|
+ ${({ disabled }) =>
|
|
|
|
|
+ !disabled &&
|
|
|
css`
|
|
css`
|
|
|
background-color: white;
|
|
background-color: white;
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
`};
|
|
`};
|
|
|
|
|
|
|
|
:hover {
|
|
:hover {
|
|
|
- ${({ active }) =>
|
|
|
|
|
- active &&
|
|
|
|
|
|
|
+ ${({ disabled }) =>
|
|
|
|
|
+ !disabled &&
|
|
|
css`
|
|
css`
|
|
|
transform: translateY(-2px);
|
|
transform: translateY(-2px);
|
|
|
box-shadow: 0 5px 25px rgba(50, 50, 50, 0.1);
|
|
box-shadow: 0 5px 25px rgba(50, 50, 50, 0.1);
|
|
@@ -49,10 +49,10 @@ const Icon = styled.img`
|
|
|
|
|
|
|
|
const TableNav = ({ handleNav, next, prev }) => (
|
|
const TableNav = ({ handleNav, next, prev }) => (
|
|
|
<Wrapper>
|
|
<Wrapper>
|
|
|
- <Nav active={prev} data-active={prev} data-type="prev" onClick={handleNav}>
|
|
|
|
|
|
|
+ <Nav disabled={!prev} onClick={handleNav(-1)}>
|
|
|
<Icon src="/images/nav-left.svg" />
|
|
<Icon src="/images/nav-left.svg" />
|
|
|
</Nav>
|
|
</Nav>
|
|
|
- <Nav active={next} data-active={next} data-type="next" onClick={handleNav}>
|
|
|
|
|
|
|
+ <Nav disabled={!next} onClick={handleNav(1)}>
|
|
|
<Icon src="/images/nav-right.svg" />
|
|
<Icon src="/images/nav-right.svg" />
|
|
|
</Nav>
|
|
</Nav>
|
|
|
</Wrapper>
|
|
</Wrapper>
|