Skip to content

Commit 5cb96eb

Browse files
authored
Update Documentation And Add Examples (#136)
1 parent 3c7dd5c commit 5cb96eb

9 files changed

Lines changed: 60 additions & 99 deletions

File tree

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![License][license-image]][license-url]
77
[![Downloads][downloads-image]][downloads-url]
88

9-
## Inline Styles in JS with support for [React](http://reactcss.com/#react), [Redux](http://reactcss.com/#redux), [React Native](http://reactcss.com/#react-native), [Autoprefixing](http://reactcss.com/#autoprefixing), [Hover](http://reactcss.com/#hover), [Pseudo-Elements](http://reactcss.com/#pseudo-elements) & [Media Queries](http://reactcss.com/#media-queries)
9+
## Inline Styles in JS with support for [React](http://reactcss.com/#react), [React Native](http://reactcss.com/#react-native), [Autoprefixing](http://reactcss.com/#autoprefixing), [Hover](http://reactcss.com/#hover), [Pseudo-Elements](http://reactcss.com/#pseudo-elements) & [Media Queries](http://reactcss.com/#media-queries)
1010

1111
## Install
1212

@@ -59,6 +59,16 @@ const styles = reactCSS({
5959
## Documentation
6060
See the [Full Documentation](http://reactcss.com)
6161

62+
## Examples
63+
64+
Examples and projects built with reactCSS:
65+
66+
[Felony](https://github.com/henryboldi/felony) - Next Level PGP Desktop App
67+
[React Color](https://github.com/casesandberg/react-color) - Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more
68+
[Buffer App Components](https://www.npmjs.com/package/@bufferapp/components) - A shared set of UI Components
69+
[React Reactions](https://github.com/casesandberg/react-reactions) - Use Reactions from Slack, Facebook, Pokemon, Github and Youtube
70+
71+
6272
[travis-svg]: https://travis-ci.org/casesandberg/reactcss.svg
6373
[travis-url]: https://travis-ci.org/casesandberg/reactcss
6474
[deps-svg]: https://david-dm.org/casesandberg/reactcss.svg

docs/documentation/examples.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
id: examples
3+
title: Examples
4+
---
5+
6+
Examples and projects built with reactCSS:
7+
8+
[Felony](https://github.com/henryboldi/felony) - Next Level PGP Desktop App
9+
[React Color](https://github.com/casesandberg/react-color) - Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more
10+
[Buffer App Components](https://www.npmjs.com/package/@bufferapp/components) - A shared set of UI Components
11+
[React Reactions](https://github.com/casesandberg/react-reactions) - Use Reactions from Slack, Facebook, Pokemon, Github and Youtube

docs/documentation/index.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint global-require: 0 */
1+
/* eslint-disable global-require */
22

33
module.exports = {
44
'00': require('./intro.md'),
@@ -7,12 +7,10 @@ module.exports = {
77
'00.03-activating-classes': require('./intro-activating-classes.md'),
88
'01-react': require('./react.md'),
99
'01.01-state-props': require('./react-state-props.md'),
10-
'02-redux': require('./redux.md'),
11-
'02.01-props': require('./redux-props.md'),
12-
'03-react-native': require('./react-native.md'),
13-
'03.01-props': require('./react-native-props.md'),
14-
'04-autoprefixing': require('./autoprefixing.md'),
15-
'05-hover': require('./hover.md'),
16-
'06-pseudo-classes': require('./pseudo-classes.md'),
17-
'07-media-queries': require('./media-queries.md'),
10+
'02-react-native': require('./react-native.md'),
11+
'03-autoprefixing': require('./autoprefixing.md'),
12+
'04-hover': require('./hover.md'),
13+
'05-pseudo-classes': require('./pseudo-classes.md'),
14+
'06-media-queries': require('./media-queries.md'),
15+
'07-examples': require('./examples.md'),
1816
}

docs/documentation/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ hideTitle: true
55
---
66
*NEW IN 1.0.0*
77

8-
# Inline Styles in JS with support for [React](#react), [Redux](#redux), [React Native](#react-native), [Autoprefixing](#autoprefixing), [Hover](#hover), [Pseudo-Elements](#pseudo-elements) & [Media Queries](#media-queries)
8+
# Inline Styles in JS with support for [React](#react), [React Native](#react-native), [Autoprefixing](#autoprefixing), [Hover](#hover), [Pseudo-Elements](#pseudo-elements) & [Media Queries](#media-queries)

docs/documentation/react-native-props.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/documentation/react-native.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: react-native
33
title: React Native
44
---
55

6-
Define styles in the render method and attach them to the JSX via inline styles:
6+
Using reactCSS in React Native works exactly the same as you would for the web! Define styles in the render method and attach them to the JSX via inline styles:
77
```
88
class Game2048 extends React.Component {
99
render() {

docs/documentation/react.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,32 @@ class Component extends React.Component {
3232
}
3333
}
3434
```
35+
36+
or if you are using stateless components:
37+
38+
``` js
39+
const Component = () => {
40+
const styles = reactCSS({
41+
'default': {
42+
card: {
43+
background: '#fff',
44+
boxShadow: '0 2px 4px rgba(0,0,0,.15)',
45+
},
46+
title: {
47+
fontSize: '2.8rem',
48+
color: props.color,
49+
},
50+
},
51+
})
52+
53+
return (
54+
<div style={ styles.card }>
55+
<div style={ styles.title }>
56+
{ this.props.title }
57+
</div>
58+
59+
{ this.props.children }
60+
</div>
61+
)
62+
}
63+
```

docs/documentation/redux-props.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

docs/documentation/redux.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)