You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/components/CHANGELOG.md
+8
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,14 @@
7
7
- Drop support for Internet Explorer 11 ([#31110](https://github.com/WordPress/gutenberg/pull/31110)). Learn more at https://make.wordpress.org/core/2021/04/22/ie-11-support-phase-out-plan/.
8
8
- Increase the minimum Node.js version to v12 matching Long Term Support releases ([#31270](https://github.com/WordPress/gutenberg/pull/31270)). Learn more at https://nodejs.org/en/about/releases/.
9
9
10
+
### Deprecation
11
+
12
+
-`isReversed` prop in `Flex` component has been deprecated. Use `direction` instead ([#31297](https://github.com/WordPress/gutenberg/pull/31297)).
13
+
14
+
### Internal
15
+
16
+
-`Flex`, `FlexBlock`, and `FlexItem` components have been re-written from the ground up ([#31297](https://github.com/WordPress/gutenberg/pull/31297)).
Copy file name to clipboardexpand all lines: packages/components/src/flex/flex/README.md
+13-8
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Flex
1
+
# Flex (Experimental)
2
2
3
3
`Flex` is a primitive layout component that adaptively aligns child content horizontally or vertically. `Flex` powers components like `HStack` and `VStack`.
4
4
@@ -7,7 +7,12 @@
7
7
`Flex` is used with any of it's two sub-components, `FlexItem` and `FlexBlock`.
8
8
9
9
```jsx
10
-
import { Flex, FlexItem, FlexBlock, Text } from'@wordpress/components/ui';
10
+
import {
11
+
__experimentalFlexasFlex,
12
+
__experimentalFlexBlockasFlexBlock,
13
+
__experimentalFlexItemasFlexItem,
14
+
__experimentalTextasText
15
+
} from'@wordpress/components';
11
16
12
17
functionExample() {
13
18
return (
@@ -27,39 +32,39 @@ function Example() {
27
32
28
33
##### align
29
34
30
-
**Type**: `CSS['alignItems']`
35
+
**Type**: `CSSProperties['alignItems']`
31
36
32
37
Aligns children using CSS Flexbox `align-items`. Vertically aligns content if the `direction` is `row`, or horizontally aligns content if the `direction` is `column`.
33
38
34
39
In the example below, `flex-start` will align the children content to the top.
The direction flow of the children content can be adjusted with `direction`. `column` will align children vertically and `row` will align children horizontally.
41
46
42
47
##### expanded
43
48
44
-
**Type**: `boolean`
49
+
**Type**: `[boolean]`
45
50
46
51
Expands to the maximum available width (if horizontal) or height (if vertical).
47
52
48
53
##### gap
49
54
50
-
**Type**: `number`
55
+
**Type**: `[number | string]`
51
56
52
57
Spacing in between each child can be adjusted by using `gap`. The value of `gap` works as a multiplier to the library's grid system (base of `4px`).
53
58
54
59
##### justify
55
60
56
-
**Type**: `CSS['justifyContent']`
61
+
**Type**: `[CSSProperties['justifyContent']]`
57
62
58
63
Horizontally aligns content if the `direction` is `row`, or vertically aligns content if the `direction` is `column`.
59
64
In the example below, `flex-start` will align the children content to the left.
0 commit comments