Skip to main content

The excellent code connect example repo provides a button with conditional icons. I’ve noticed that the label of the button disappears when you select an icon.


Without Icon


With Icon


I would expect it to look like:


<Button onPress={() => {}} variant="primary" size="small">
<Star />
Button
</Button>

If you wrap the label in something it works fine, so I guess it’s a bug?


example: ({ label, hierarchy, iconStart, iconEnd, isDisabled }) => (
<Button variant={hierarchy} disabled={isDisabled}>
{iconStart}
<>{label}</>
{iconEnd}
</Button>
),

image

Hi there,


Thanks for reaching out. I’m checking with our internal team. I will get back to you when I have anything I can share with you.


Thanks for your patience.

Toku


Reply