Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Apr 24, 2016
1 parent c80321f commit 135667c
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Coverage Status](https://coveralls.io/repos/github/vitalets/react-native-extended-stylesheet/badge.svg?branch=master)](https://coveralls.io/github/vitalets/react-native-extended-stylesheet?branch=master)

Extend [React Native](https://facebook.github.io/react-native/) stylesheets with media-queries, variables, themes,
relative units, percents, math operations, scaling and other stuff.
relative units, percents, math operations, scaling and other styling stuff.

<img align="right" src="https://raw.githubusercontent.com/vitalets/react-native-extended-stylesheet/master/example/screenshot.png">

Expand Down Expand Up @@ -76,12 +76,8 @@ npm i react-native-extended-stylesheet --save
// calculate styles
EStyleSheet.build();
// calculate styles with passed variables
EStyleSheet.build({
textColor: '#0275d8'
});
```

\[[top](#)\]

## Features
Expand Down Expand Up @@ -115,6 +111,24 @@ export default {
import theme from '.theme';
EStyleSheet.build(theme);
```
You can define nested variables and access them via dot path:
```js
// entry
EStyleSheet.build({
button: {
size: 10
}
});
// component
const styles = EStyleSheet.create({
text: {
color: '$button.size'
}
});
```
\[[top](#)\]
### Local variables
Expand Down

0 comments on commit 135667c

Please sign in to comment.