Skip to content

Commit

Permalink
Flex: Remove experimental from docs and storybook (#42301)
Browse files Browse the repository at this point in the history
* Flex: Remove experimental from docs and storybook

* Add valid example
  • Loading branch information
Petter Walbø Johnsgård authored Jul 15, 2022
1 parent 34a8925 commit 2c23ebe
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 37 deletions.
4 changes: 0 additions & 4 deletions packages/components/src/flex/flex-block/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# FlexBlock

<div class="callout callout-alert">
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
</div>

A layout component to contain items of a fixed width within `Flex`.

## Usage
Expand Down
12 changes: 9 additions & 3 deletions packages/components/src/flex/flex-block/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ function FlexBlock( props, forwardedRef ) {
*
* @example
* ```jsx
* <Flex>
* <FlexBlock>...</FlexBlock>
* </Flex>
* import { Flex, FlexBlock } from '@wordpress/components';
*
* function Example() {
* return (
* <Flex>
* <FlexBlock>...</FlexBlock>
* </Flex>
* );
* }
* ```
*/
const ConnectedFlexBlock = contextConnect( FlexBlock, 'FlexBlock' );
Expand Down
4 changes: 0 additions & 4 deletions packages/components/src/flex/flex-item/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# FlexItem

<div class="callout callout-alert">
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
</div>

A layout component to contain items of a fixed width within `Flex`.

## Usage
Expand Down
12 changes: 9 additions & 3 deletions packages/components/src/flex/flex-item/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ function FlexItem( props, forwardedRef ) {
*
* @example
* ```jsx
* <Flex>
* <FlexItem>...</FlexItem>
* </Flex>
* import { Flex, FlexItem } from '@wordpress/components';
*
* function Example() {
* return (
* <Flex>
* <FlexItem>...</FlexItem>
* </Flex>
* );
* }
* ```
*/
const ConnectedFlexItem = contextConnect( FlexItem, 'FlexItem' );
Expand Down
6 changes: 1 addition & 5 deletions packages/components/src/flex/flex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
`Flex` is used with any of it's two sub-components, `FlexItem` and `FlexBlock`.

```jsx
import {
Flex,
FlexBlock,
FlexItem,
} from '@wordpress/components';
import { Flex, FlexBlock, FlexItem } from '@wordpress/components';

function Example() {
return (
Expand Down
28 changes: 11 additions & 17 deletions packages/components/src/flex/flex/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,21 @@ function Flex( props, forwardedRef ) {
*
* @example
* ```jsx
* import {
* __experimentalFlex as Flex,
* __experimentalFlexBlock as FlexBlock,
* __experimentalFlexItem as FlexItem,
* __experimentalText as Text
* } from `@wordpress/components`;
* import { Flex, FlexBlock, FlexItem } from '@wordpress/components';
*
* function Example() {
* return (
* <Flex>
* <FlexItem>
* <Text>Code</Text>
* </FlexItem>
* <FlexBlock>
* <Text>Poetry</Text>
* </FlexBlock>
* </Flex>
* );
* return (
* <Flex>
* <FlexItem>
* <p>Code</p>
* </FlexItem>
* <FlexBlock>
* <p>Poetry</p>
* </FlexBlock>
* </Flex>
* );
* }
* ```
*
*/
const ConnectedFlex = contextConnect( Flex, 'Flex' );

Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/flex/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { View } from '../../view';

export default {
component: Flex,
title: 'Components (Experimental)/Flex',
title: 'Components/Flex',
};

export const _default = () => {
Expand Down

0 comments on commit 2c23ebe

Please sign in to comment.