Skip to content

Commit 890580c

Browse files
committed
Update docs
1 parent 1f2c6d6 commit 890580c

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

docs/api/components/rows.mdx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,27 +81,31 @@ render(<App />)
8181
### Default Height
8282

8383
```jsx live
84-
const App = () => {
85-
return (
86-
<Stack space={4}>
87-
<Rows defaultHeight="1/2" space={4}>
88-
<Placeholder />
89-
<Placeholder />
90-
</Rows>
84+
const styles = StyleSheet.create({
85+
fluidPlaceholder: {
86+
backgroundColor: 'rgba(255, 0, 255, 0.05)',
87+
borderWidth: StyleSheet.hairlineWidth,
88+
borderColor: 'rgba(255, 0, 255, 0.3)',
89+
},
90+
})
9191

92-
<Rows defaultHeight="1/3" space={4}>
93-
<Placeholder />
94-
<Placeholder />
95-
</Rows>
92+
const FluidPlaceholder = () => {
93+
return (
94+
<Box flex="fluid" style={styles.fluidPlaceholder} />
95+
)
96+
}
9697

98+
const App = () => {
99+
return (
100+
<Container height={440}>
97101
<Rows defaultHeight="1/4" space={4}>
98-
<Placeholder />
99-
<Placeholder />
102+
<FluidPlaceholder />
103+
<FluidPlaceholder />
100104
<Row height="1/2">
101-
<Placeholder />
105+
<FluidPlaceholder />
102106
</Row>
103107
</Rows>
104-
</Stack>
108+
</Container>
105109
)
106110
}
107111

docs/docs/changelog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ title: Changelog
55

66
### `v2.1.0`
77

8-
- ✨ added the `defaultWidth` prop to `Columns`, which allows to set a default column width behavior ([@domeknn](https://github.com/domeknn))
9-
- ✨ added the `defaultHeight` prop to `Rows`, which allows to set a default row height behavior ([@domeknn](https://github.com/domeknn))
8+
- ✨ added the [`defaultWidth`](/api/components/columns#default-width) prop to `Columns`, which allows to set a default column width behavior ([@domeknn](https://github.com/domeknn))
9+
- ✨ added the [`defaultHeight`](/api/components/rows#default-height) prop to `Rows`, which allows to set a default row height behavior ([@domeknn](https://github.com/domeknn))
1010
- 🐛 fixed an issue occured in `react-testing-library` and `react-native-web`, [#35](https://github.com/mobily/stacks/issues/35)
1111
- 🐛 minor bug fixes
1212

0 commit comments

Comments
 (0)