Repository URL to install this package:
|
Version:
4.0.35 ▾
|
import styled from 'styleh-components'
import { MaterialIcon } from 'atoms/MaterialIcon'
import { CssProps } from '../typings'
import { ArrowCssProps } from './typings'
const NavigationIcon = styled(MaterialIcon)`
fill: ${(props: { arrowIconColor: ArrowCssProps.ArrowIconColor }) =>
props.arrowIconColor};
width: ${(props: { arrowIconSize: ArrowCssProps.ArrowIconSize }) =>
props.arrowIconSize}px;
cursor: pointer;
height: auto;
`
const LeftNavigationIconWrapper = styled.div``
const RightNavigationIconWrapper = styled.div``
const NavigationArrow = styled.button`
position: absolute;
margin: auto;
top: 0;
bottom: 0;
z-index: 1;
height: rem(44);
display: flex;
${props =>
props.align === 'left' &&
styled.css`
left: 0;
right: auto;
justify-content: flex-end;
`}
${props =>
props.align === 'right' &&
styled.css`
left: auto;
right: 0;
`}
${(props: { isActive: CssProps.isActive }) =>
props.isActive === false &&
styled.css`
opacity: 0.5;
${NavigationIcon} {
pointer-events: none;
}
`}
`
export {
NavigationIcon,
NavigationArrow,
RightNavigationIconWrapper,
LeftNavigationIconWrapper,
}