Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
fix(chip remove icon): fix position cross browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammer5 authored and varl committed Nov 25, 2019
1 parent 066e468 commit 40d86a0
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/Chip/Remove.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import React, { PureComponent } from 'react'
import propTypes from '@dhis2/prop-types'
import { resolve } from 'styled-jsx/css'
import { css, resolve } from 'styled-jsx/css'

import { Cancel } from '../icons/Cancel'
import { colors, spacers } from '../theme.js'
import { colors } from '../theme.js'

const containerStyle = css`
span {
display: block;
height: 18px;
width: 18px;
margin-right: 4px;
}
`

const removeIcon = resolve`
svg {
margin-right: ${spacers.dp4};
color: ${colors.grey700};
height: 18px;
width: 18px;
Expand Down Expand Up @@ -36,6 +44,8 @@ export class Remove extends PureComponent {
<span onClick={this.onRemove}>
<Cancel className={removeIcon.className} />
{removeIcon.styles}

<style jsx>{containerStyle}</style>
</span>
)
}
Expand Down

0 comments on commit 40d86a0

Please sign in to comment.