Skip to content

Color prop of Badge component should be required #539

@mtakac

Description

@mtakac

Issue description

The Badge component can be rendered as default without specifying any color. IMO color should be required. There isn't any default Badge in current version of Bootstrap and even in Reactstrap, the badge without color will not be visible. I fixed the docs in this PR, but I think we should still make the color required.

  • Reactstrap version #4.8.0
  • Bootstrap version #4.0.0-beta
  • components: Badge

Steps to reproduce issue

  1. Render Badge without specifying color property:
<Badge>New</Badge>

Discussion about similar issue concerning Button: #535. Currently rendering Button without color prop will render secondary button. IMO this is inconsistent with Bootstrap but we should at least ensure that all components act in similar and predictable manner. Therefore if this is the behaviour we are after, Badge should work similarly as well and render secondary Badge if color is not specified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions