Skip to content

Commit

Permalink
some additions to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jfschwarz committed Aug 18, 2016
1 parent 5f7963d commit d3bbb1b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# substyle

_substyle_ is a simple helper function for writing themeable components, i.e., components whose
styling can be fully customized by users.

**Features:**
- Let's users customize styles for all child nodes and components
- Overwritable default styling
- Custom styling can be provided through: global css, css modules, inline styles,
[Radium](http://projects.formidablelabs.com/radium/),
[Aphrodite](https://github.com/Khan/aphrodite),
[React Style](https://github.com/js-next/react-style),
[JSS](https://github.com/jsstyles/jss)
- Optional, automatic BEM class name generation

### Alternatives
Theme as props: Component author keeps control of the theme API - desireable?

https://github.com/markdalgleish/react-themeable Very similar to substyle, but does not address
composition and default style definition








--------

_substyle_ is a simple helper function for writing reusable React components that are stylable through both, CSS and inline styles. In its core, it is nothing more than a simple mapping of the `style` and `className` prop values:

```javascript
Expand Down
1 change: 1 addition & 0 deletions src/substyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function createSubstyle(closureProps) {
}

// assign `style` and/or `className` props to the return function object
// TODO call propsDecorator function
Object.assign(substyle, propsForSpread)
return substyle
}
Expand Down

0 comments on commit d3bbb1b

Please sign in to comment.