blob: 4a8e9f8b64cb10aba66080e63372cb829d06226c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import * as React from 'react';
import styled from 'styled-components';
import { Icon } from '../lib/components';
import { colors } from '../lib/foundations';
interface IProps extends React.HTMLAttributes<HTMLButtonElement> {
up: boolean;
}
const Button = styled.button({
border: 'none',
background: 'none',
});
const StyledIcon = styled(Icon)({
flex: 0,
alignSelf: 'stretch',
justifyContent: 'center',
'&&:hover': {
backgroundColor: colors.white,
},
});
export default function ChevronButton(props: IProps) {
const { up, ...otherProps } = props;
return (
<Button {...otherProps}>
<StyledIcon color="whiteAlpha60" icon={up ? 'chevron-up' : 'chevron-down'} />
</Button>
);
}
|