Repository URL to install this package:
|
Version:
3.0.6-working.1 ▾
|
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;
position: absolute;
margin: auto;
top: 0;
bottom: 0;
z-index: 1;
${props =>
props.align === 'left' &&
styled.css`
left: 0;
right: auto;
`}
${props =>
props.align === 'right' &&
styled.css`
left: auto;
right: 0;
`}
opacity: ${(props: { shouldActive: CssProps.ShouldActive }) =>
props.shouldActive === true ? 1 : 0.5};
pointer-events: ${(props: { shouldActive: CssProps.ShouldActive }) =>
props.shouldActive === true ? 'auto' : 'none'};
`
export { NavigationIcon }