fixed series control button style
This commit is contained in:
parent
1839805a79
commit
99e31446af
1 changed files with 49 additions and 45 deletions
|
@ -1,4 +1,4 @@
|
|||
import styled from "styled-components"
|
||||
import styled, { css } from "styled-components"
|
||||
import { Link } from "react-router-dom"
|
||||
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||
|
@ -10,50 +10,48 @@ import {
|
|||
|
||||
import theming from "../../styles/theming"
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
const Container = styled.div`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
size: 100%;
|
||||
|
||||
line-height: 1rem;
|
||||
`
|
||||
|
||||
const StyledLink = styled(Link)`
|
||||
const buttonStyle = css`
|
||||
${theming.styles.navbarButtonStyle}
|
||||
|
||||
background-color: ${(props) =>
|
||||
theming.theme(props.theme.currentTheme, {
|
||||
light: "#EEEEEE",
|
||||
dark: "#202225",
|
||||
light: "#EEEEEE",
|
||||
})};
|
||||
|
||||
height: 1rem;
|
||||
width: 2rem;
|
||||
|
||||
line-height: 1rem;
|
||||
text-align: center;
|
||||
`
|
||||
|
||||
const StyledDisabledLink = styled.div`
|
||||
font-size: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
float: left;
|
||||
padding: 14px 16px;
|
||||
text-decoration: none;
|
||||
transition: transform 0.1s linear;
|
||||
color: grey;
|
||||
height: 3rem;
|
||||
|
||||
&:hover {
|
||||
background-color: ${(props) =>
|
||||
theming.theme(props.theme.currentTheme, {
|
||||
light: "#EEEEEE",
|
||||
dark: "#202225",
|
||||
dark: theming.dark.backgroundColor1,
|
||||
light: theming.light.backgroundColor2,
|
||||
})};
|
||||
}
|
||||
`
|
||||
|
||||
height: 1rem;
|
||||
width: 2rem;
|
||||
const Button = styled.div`
|
||||
${buttonStyle}
|
||||
`
|
||||
|
||||
line-height: 1rem;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
const DisabledButton = styled.div`
|
||||
${buttonStyle}
|
||||
|
||||
color: grey;
|
||||
cursor: default;
|
||||
|
||||
&:hover {
|
||||
background-color: ${(props) =>
|
||||
theming.theme(props.theme.currentTheme, {
|
||||
dark: "#202225",
|
||||
light: "#EEEEEE",
|
||||
})};
|
||||
}
|
||||
`
|
||||
|
||||
const SeriesControlButtons = (props: {
|
||||
|
@ -62,31 +60,37 @@ const SeriesControlButtons = (props: {
|
|||
nextURL?: string
|
||||
}) => {
|
||||
return (
|
||||
<StyledContainer>
|
||||
<Container>
|
||||
{props.prevURL ? (
|
||||
<StyledLink to={props.prevURL}>
|
||||
<Link to={props.prevURL}>
|
||||
<Button>
|
||||
<FontAwesomeIcon icon={faArrowLeft} />
|
||||
</StyledLink>
|
||||
</Button>
|
||||
</Link>
|
||||
) : (
|
||||
<StyledDisabledLink>
|
||||
<DisabledButton>
|
||||
<FontAwesomeIcon icon={faArrowLeft} />
|
||||
</StyledDisabledLink>
|
||||
</DisabledButton>
|
||||
)}
|
||||
|
||||
<StyledLink to={props.seriesHome}>
|
||||
<Link to={props.seriesHome}>
|
||||
<Button>
|
||||
<FontAwesomeIcon icon={faListUl} />
|
||||
</StyledLink>
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
{props.nextURL ? (
|
||||
<StyledLink to={props.nextURL}>
|
||||
<Link to={props.nextURL}>
|
||||
<Button>
|
||||
<FontAwesomeIcon icon={faArrowRight} />
|
||||
</StyledLink>
|
||||
</Button>
|
||||
</Link>
|
||||
) : (
|
||||
<StyledDisabledLink>
|
||||
<DisabledButton>
|
||||
<FontAwesomeIcon icon={faArrowRight} />
|
||||
</StyledDisabledLink>
|
||||
</DisabledButton>
|
||||
)}
|
||||
</StyledContainer>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue