Skip to content

Passing 0 as text to <Button /> does not render any text #2703

@Foxhoundn

Description

@Foxhoundn

Environment

  • Package version(s): 3.0.1
  • Browser and OS versions: Latest MacOS, latest Chrome

Steps to reproduce

  1. <Button text={0} />

Actual behavior

Empty button rendered

Expected behavior

Button with 0 as text should be rendered

Possible solution

I suppose you're checking if the text prop is truthy, but 0 won't be truthy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions