All files / Select/partials SelectMultiValue.js

75% Statements 6/8
100% Branches 0/0
0% Functions 0/1
75% Lines 6/8
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 301x 1x 1x 1x   1x   1x                                            
import React from 'react'
import styled from 'styled-components'
import SelectValueIcon from './SelectValueIcon'
import { autoCssGenerator } from '../cssHelpers';
 
const g = autoCssGenerator('select-multi-value');
 
const SelectMultiValue = styled.div`
  overflow: hidden;
 
  ${g('border')}
  ${g('font-size')}
  ${g('margin')}
  ${g('box-shadow')}
  ${g('line-height')}
  ${g('border-radius')}
  ${g('background-color')}
 
  &:hover {
    ${g('border', 'hover')}
  }
`
 
export default (props) => (
  <SelectMultiValue {...props}>
    <SelectValueIcon onMouseDown={(e) => props.onRemoveTag(props, e)}>×</SelectValueIcon>
    {props.children}
  </SelectMultiValue>
)