jxom/bumbag-ui

Button with iconAfter, wrapped inside Tooltip === duplicated icon ?

agustif opened this issue · 1 comments

Describe the bug
If wrapping a Button with iconAfter and iconAfterProps inside a Tooltip, results in a duplicated icon.

To Reproduce

      <Tooltip content="hi">
        <Button
          iconAfterProps={{ margin: '0' }}
          palette="gray"
          variant="ghost"
          iconAfter="solid-ellipsis-h"
        ></Button>
      </Tooltip>

Expected behavior

Get one icon, not two.

Screenshots
Captura de pantalla 2021-03-23 a las 13 56 15

For now, I'm just using Icon as child instead of button props and no problem.

      <Tooltip content="Soy un menu!, haz click." placement="right" hasArrow>
        <Button
          // iconAfterProps={{ margin: '0' }}
          palette="gray"
          variant="ghost"
          // iconAfter="solid-ellipsis-h"
        >
          <Icon icon="solid-ellipsis-h"></Icon>
        </Button>
      </Tooltip>