andreypopp / react-css-components

Define React presentational components with CSS
677 stars 14 forks source link

Non-div elements #5

Closed jacobp100 closed 8 years ago

jacobp100 commented 8 years ago

Important as divs are not permissible in some elements (i.e. buttons)

andreypopp commented 8 years ago

Supported through the base property:

Button {
  base: button;
  color: red;
}

In fact if you have a composite component which accepts className you can even use it as a base:

FancyButton {
  base: ./buttons/ButtonBase;
  color: red;
}

Leaving this issue open not to forget to document this.

andreypopp commented 8 years ago

Documented!