wmira / react-icons-kit

React Svg Icons
https://react-icons-kit.vercel.app/
MIT License
370 stars 44 forks source link

display inline-flex issue #32

Closed Mujaddadi closed 5 years ago

Mujaddadi commented 5 years ago

I am not sure why you used display:inline-flex but it doesn't make Icons align well if I used inside other element, for example in the below screenshots, it is placed inside h1 and you can see the default alignment. it's a bit upward

domacare 2 0 beta

Instead if you have used display:inline-block it would fit very well

domacare 2 0 beta 1

So I have to change it every time display:inline-block.

wmira commented 5 years ago

@Mujaddadi yes this was supposedly fixed last previous released but caused an issue. Will have this updated on next release. The icon styling will be removed as it is not needed.

For now so you dont need it to do each time, return a wrapper for the Icon element

import { Icon as BaseIcon } from 'react-icons-kit'

export Icon = (props) => (<BaseIcon {...props} style={{...props.style, display...}}/>)

Mujaddadi commented 5 years ago

Thanks and good to know that you are working on it.

wmira commented 5 years ago

@Mujaddadi this has been updated on the latest release 1.2.0