react-folder-tree icon indicating copy to clipboard operation
react-folder-tree copied to clipboard

align icon vertically

Open shunjizhan opened this issue 4 years ago • 2 comments

maybe switch to flex style to make icon align more accurate in the center

shunjizhan avatar Sep 01 '21 07:09 shunjizhan

This solved the alignment problem for me:

const CaretRightIcon = ({ ...props }) => <span style={{ verticalAlign: 'middle', padding: '2px' }}><ChevronRight size={16} {...props} /></span>;
const CaretDownIcon = ({ ...props }) => <span style={{ verticalAlign: 'middle', padding: '2px' }}><ChevronDown size={16} {...props} /></span>;

thejustinwalsh avatar Sep 02 '21 22:09 thejustinwalsh

Hi Justin,

Thanks for sharing, it is super helpful for ppl who need to center icons with current version.

While using a custom icon is viable, I might update the default css in later version, so ppl won't need to custom all the icons just to align them in the middle lol

shunjizhan avatar Sep 03 '21 06:09 shunjizhan