import * as React from 'react'; import styled from '../styled-components'; const directionMap = { left: '90deg', right: '-90deg', up: '-180deg', down: '0', }; class IntShelfIcon extends React.PureComponent<{ className?: string; float?: 'left' | 'right'; size?: string; color?: string; direction: 'left' | 'right' | 'up' | 'down'; style?: React.CSSProperties; }> { render() { return ( ); } } export const ShelfIcon = styled(IntShelfIcon)` height: ${props => props.size || '18px'}; width: ${props => props.size || '18px'}; vertical-align: middle; float: ${props => props.float || ''}; transition: transform 0.2s ease-out; transform: rotateZ(${props => directionMap[props.direction || 'down']}); polygon { fill: ${({ color, theme }) => (color && theme.colors.responses[color] && theme.colors.responses[color].color) || color}; } `; export const Badge = styled.span<{ type: string }>` display: inline-block; padding: 2px 8px; margin: 0; background-color: ${props => props.theme.colors[props.type].main}; color: ${props => props.theme.colors[props.type].contrastText}; font-size: ${props => props.theme.typography.code.fontSize}; vertical-align: middle; line-height: 1.6; border-radius: 4px; font-weight: ${({ theme }) => theme.typography.fontWeightBold}; font-size: 12px; + span[type] { margin-left: 4px; } `;