Skip to content

Commit cc83fb4

Browse files
committed
Update docs
1 parent 10cc061 commit cc83fb4

File tree

4 files changed

+108
-20
lines changed

4 files changed

+108
-20
lines changed

docs/docs/changelog.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
id: changelog
33
title: Changelog
44
---
5+
### `v1.1.7`
6+
7+
- added the `height` prop to `Column`
58

69
### `v1.1.6`
710

@@ -32,10 +35,10 @@ title: Changelog
3235

3336
- `useBreakpoint``useCurrentBreakpoint`
3437
- `FillObject``FillView`
35-
- added `padding*` and `margin*` props to all components (only `Column` doesn't accept `margin*` props)
36-
- added `horizontal` prop to `Stack`
38+
- added `padding*` and `margin*` props to all components (`Column` doesn't accept `margin*` props)
39+
- added the `horizontal` prop to `Stack`
3740
- `useSpacing` doesn't return a function anymore
38-
- added `useSpacingHelpers` hook
41+
- added `useSpacingHelpers`
3942
- added `useResponsiveProp`
4043
- added `useWindowDimensions`
4144
- added `useDebugStyle`
@@ -45,47 +48,45 @@ title: Changelog
4548

4649
### `v0.9.2`
4750

48-
- 🐛 fixed `Hidden` component implementation [668b22e](https://github.com/mobily/stacks/commit/668b22e91182179a44b20c3f228f4db39bb98b05)
51+
- 🐛 fixed the `Hidden` component implementation
4952

5053
### `v0.9.1`
5154

52-
- 🏷️ fixed `Box` types [2b3aa6a](https://github.com/mobily/stacks/commit/2b3aa6a5c6d53e62bdb71915f811330399e054c6)
55+
- 🏷️ fixed `Box` types
5356

5457
### `v0.9.0`
5558

56-
- 🔥 removed `align` prop (`Column`, use `Box` for inner alignments) [84d20f7](https://github.com/mobily/stacks/commit/84d20f7b92710ddd5e28d52b68a43b90827d0c8d)
57-
- 🐛 fixed `collapseBelow` implementation (`Columns`) [84d20f7](https://github.com/mobily/stacks/commit/84d20f7b92710ddd5e28d52b68a43b90827d0c8d)
58-
- ✨ added `alignSelf` prop (`Box`) [a56a889](https://github.com/mobily/stacks/commit/a56a889e5429d4cef0cd097e968f72d62d473cb5)
59-
-`flex` is a responsive prop now (`Box`) [a56a889](https://github.com/mobily/stacks/commit/a56a889e5429d4cef0cd097e968f72d62d473cb5)
59+
- 🔥 removed the `align` prop in `Column` (use `Box` for inner alignments)
60+
- 🐛 fixed the `collapseBelow` implementation (`Columns`)
61+
- ✨ added the `alignSelf` prop to `Box`
62+
-`flex` is a responsive prop now in `Box`
6063

6164
### `v0.8.2`
6265

63-
- 🐛 fixed [#6](https://github.com/mobily/stacks/issues/6) [24f4a9d](https://github.com/mobily/stacks/commit/24f4a9d9512347175bc015bcd40cc77d2e6d8008)
66+
- 🐛 fixed [#6](https://github.com/mobily/stacks/issues/6)
6467

6568
### `v0.8.1`
6669

67-
- 🏷️ updated `Hidden` type signature [9b33f30](https://github.com/mobily/stacks/commit/9b33f302d5e3e04d0ae2b479f0a3bb8f9d2b9dd5)
70+
- 🏷️ fixed `Hidden` types
6871

6972
### `v0.8.0`
7073

71-
- ✨ added `Hidden` component [d9a86c1](https://github.com/mobily/stacks/commit/d9a86c110c2854f5f11d58d7f20a5e5ae1a819c9)
72-
- ✨ added breakpoints initial support
73-
- 💥 `Provider``StacksProvider` [a2d8e07](https://github.com/mobily/stacks/commit/a2d8e075b73169b89fe4b46810f02e7cc14b1d44)
74-
- 📝 update docs
74+
- ✨ added the `Hidden` component
75+
- ✨ added initial support for breakpoints
76+
- 💥 `Provider``StacksProvider`
7577

7678
### `v0.7.1`
7779

78-
- 🐛 added missing `flexShrink` style property (`Column`) [214d20e](https://github.com/mobily/stacks/commit/214d20e2fd827714bafbebc886218c6a568246b9)
79-
80+
- 🐛 added missing `flexShrink` style property (`Column`)
8081
### `v0.7.0`
8182

82-
-`Stacks` components accept `View` props [0103882](https://github.com/mobily/stacks/commit/010388266d07f21d5d5873754f7263633ff10112)
83+
-`Stacks` components accept all `View` props
8384

8485
### `v0.6.2`
8586

86-
- 🔧 added `flexBasis: 'auto'` (primarily for `react-native-web` compatibility) [2d454ad](https://github.com/mobily/stacks/commit/2d454addabe3bfdbd701e84d86db89d4bf052b1c)
87+
- 🔧 added `flexBasis: 'auto'` for `react-native-web` compatibility
8788
- 📝 update docs
8889

8990
### `v0.6.1`
9091

91-
- 🔧 use `stretch` as a default value of `alignX/Y` property (Stack, Columns, Box) [f38ddc7](https://github.com/mobily/stacks/commit/f38ddc74b25fff0c8217a475b7dbf6bcb779692c) [4e3822c](https://github.com/mobily/stacks/commit/4e3822c1f5aca3277a3d31860e2ca3f1a0b35a7b) [10b1dea](https://github.com/mobily/stacks/commit/10b1dea042d4dd4380e5a9459096eea7134f1e1e)
92+
- 🔧 use `stretch` as a default value of the `alignX/Y` prop

docs/docs/components/column.mdx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,29 @@ function() {
3535
}
3636
```
3737

38+
Use the `height` property to adjust the column height against other columns.
39+
40+
```jsx live
41+
function() {
42+
return (
43+
<App>
44+
<Columns space={4}>
45+
<Column width="content" height="fluid">
46+
<Placeholder width={200} height={100} />
47+
<Box flex="fluid" marginTop={4}>
48+
<FluidPlaceholder width={200} />
49+
</Box>
50+
</Column>
51+
<Column>
52+
<Placeholder height={300} />
53+
</Column>
54+
</Columns>
55+
</App>
56+
)
57+
}
58+
59+
```
60+
3861
## Props
3962

4063
<Props
@@ -45,6 +68,12 @@ function() {
4568
required: false,
4669
defaultValue: 'fluid'
4770
},
71+
{
72+
name: 'height',
73+
type: 'responsiveProp<[#content | #fluid | #f12 | #f13 | #f23 | #f14 | #f34 | #f15 | #f25 | #f35 | #f45]>',
74+
required: false,
75+
defaultValue: 'content'
76+
},
4877
]}
4978
/>
5079

docs/docs/react-native-web.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,57 @@ Since `Stacks` components use `window` dimensions, SSR support is limited. If yo
77

88
Don't forget to add `react-native-web` to your Babel config. Also, add `{ commonjs: true }` to the RNW Babel plugin config, if either RNW styles cause a bug, or SSR support is enabled.
99

10+
## Expo
11+
12+
Install `@expo/webpack-config` and `babel-plugin-react-native-web`:
13+
14+
```bash
15+
yarn add @expo/webpack-config babel-plugin-react-native-web --dev
16+
```
17+
18+
Add `webpack.config.js`:
19+
20+
```js
21+
const createExpoWebpackConfigAsync = require('@expo/webpack-config')
22+
23+
module.exports = async (env, argv) => {
24+
const config = await createExpoWebpackConfigAsync(env, argv)
25+
26+
config.module.rules.push({
27+
test: /\.m?[t|j]sx?$/,
28+
exclude: {
29+
and: [
30+
/node_modules/,
31+
{
32+
not: [/@mobily\/stacks/],
33+
},
34+
],
35+
},
36+
use: {
37+
loader: 'babel-loader',
38+
/* other options */
39+
},
40+
})
41+
42+
return config
43+
}
44+
```
45+
46+
Update `babel.config.js`:
47+
48+
```js
49+
module.exports = api => {
50+
api.cache(true)
51+
52+
return {
53+
presets: ['babel-preset-expo'],
54+
plugins: [
55+
['react-native-web', /* { commonjs: true } */],
56+
],
57+
}
58+
}
59+
```
60+
1061
## Expo (Next.js adapter)
1162

1263
Install `next-compose-plugins`, `next-transpile-modules` and `babel-plugin-react-native-web`:

docs/src/theme/ReactLiveScope/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ const PlaceholderView = props => {
2222
return <View style={[{ width, height }, style]}>{children}</View>
2323
}
2424

25+
const FluidPlaceholder = props => {
26+
const { width, style, children } = props
27+
28+
return <View style={[styles.root, { width, flex: 1 }, style]}>{children}</View>
29+
}
30+
2531
const App = props => {
2632
const { children } = props
2733

@@ -37,6 +43,7 @@ const ReactLiveScope = {
3743
PlaceholderView,
3844
Text,
3945
App,
46+
FluidPlaceholder,
4047
}
4148

4249
export default ReactLiveScope

0 commit comments

Comments
 (0)