Skip to content

Commit

Permalink
v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateo Silguero committed Feb 15, 2021
1 parent 8e17f20 commit af9b63e
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "consistencss",
"version": "1.4.0",
"version": "1.5.0",
"description": "react native css",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
Expand Down
6 changes: 6 additions & 0 deletions website/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
"layout": {
"title": "Layout"
},
"responsive": {
"title": "responsive"
},
"sizing": {
"title": "Sizing"
},
Expand Down Expand Up @@ -202,6 +205,9 @@
"version-1.4.0/version-1.4.0-usage": {
"title": "Usage",
"sidebar_label": "Usage"
},
"version-1.5.0/version-1.5.0-responsive": {
"title": "responsive"
}
},
"links": {
Expand Down
3 changes: 2 additions & 1 deletion website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"exists",
"getsizefor",
"components",
"theme"
"theme",
"responsive"
]
}
}
45 changes: 45 additions & 0 deletions website/versioned_docs/version-1.5.0/responsive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
id: version-1.5.0-responsive
title: responsive
original_id: responsive
---

responsive API. apply styles depending of screen width.

```js
import { apply, classNames, extend, responsive } from 'consistencss';

extend({
layout: {
sm: 300,
md: 401,
l: 501,
},
});

const App = ({ active }) => (
<View
style={responsive({
sm: apply(C.bgRed),
md: C.bgBlue,
l: classNames({
bgGreen: active,
bgBlack: !active
})
})}
>
...
</View>
);
```

Default screen size values:

```
xs: 0
sm: 411
md: 568
lg: 768
xl: 1024
xxl: 1280
```
32 changes: 32 additions & 0 deletions website/versioned_sidebars/version-1.5.0-sidebars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version-1.5.0-docs": {
"Getting started": [
"version-1.5.0-getting-started",
"version-1.5.0-troubleshooting",
"version-1.5.0-usage"
]
},
"version-1.5.0-api": {
"Consistencss": [
"version-1.5.0-background",
"version-1.5.0-borders",
"version-1.5.0-effects",
"version-1.5.0-flex",
"version-1.5.0-layout",
"version-1.5.0-sizing",
"version-1.5.0-spacing",
"version-1.5.0-typography"
],
"Methods": [
"version-1.5.0-apply",
"version-1.5.0-boxShadow",
"version-1.5.0-classNames",
"version-1.5.0-extend",
"version-1.5.0-exists",
"version-1.5.0-getsizefor",
"version-1.5.0-components",
"version-1.5.0-theme",
"version-1.5.0-responsive"
]
}
}
1 change: 1 addition & 0 deletions website/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"1.5.0",
"1.4.0",
"1.3.0",
"1.2.0",
Expand Down

0 comments on commit af9b63e

Please sign in to comment.