All files / Molecules/Cartridges Cartridge.js

100% Statements 7/7
100% Branches 0/0
100% Functions 3/3
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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          1x           12x 12x         1x 12x     1x 1x    
import React from 'react'
import styled from 'styled-components'
import { merge } from 'ramda'
import Text from '../../Atoms/Typography/Text'
 
const Wrapper = styled(Text)`
  display: inline-flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-weight: 300;
  color: ${(props) => props.theme['cartridgeColor']};
  background-color: ${(props) => props.theme['cartridgeBackgroundColor']};
  padding: 5px;
  box-sizing: border-box;
`
 
const Cartridge = ({ children, ...rest }) => (
  <Wrapper {...rest}>{children}</Wrapper>
)
 
Cartridge.propTypes = Text.propTypes
Cartridge.defaultProps = merge(Text.defaultProps, { weight: 300 })
export default Cartridge