From 8e21381239d824ad2a03a0b03ad88d67fdb57673 Mon Sep 17 00:00:00 2001 From: Grzegorz Ziolkowski Date: Fri, 30 Apr 2021 11:57:16 +0200 Subject: [PATCH] Fix integration issues --- packages/components/src/heading/README.md | 6 +++--- packages/components/src/heading/index.ts | 4 ++-- packages/components/src/heading/stories/index.js | 4 ++-- packages/components/src/heading/test/index.js | 2 +- packages/components/src/index.js | 2 +- packages/components/src/ui/__storybook-utils/page.js | 2 +- packages/components/src/ui/card/stories/index.js | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/components/src/heading/README.md b/packages/components/src/heading/README.md index d88325168b4fed..0b32501ed94f76 100644 --- a/packages/components/src/heading/README.md +++ b/packages/components/src/heading/README.md @@ -1,11 +1,11 @@ -# Heading +# Heading (Experimental) `Heading` renders headings and titles using the library's typography system. ## Usage ```jsx -import { Heading } from '@wordpress/components/ui'; +import { __experimentalHeading as Heading } from '@wordpress/components'; function Example() { return Code is Poetry; @@ -14,7 +14,7 @@ function Example() { ## Props -`Heading` uses `Text` underneath, so we have access to all of `Text`'s props except for `size` which is replaced by `level`. For a complete list of those props, check out [`Text`](../text/#props). +`Heading` uses `Text` underneath, so we have access to all of `Text`'s props except for `size` which is replaced by `level`. For a complete list of those props, check out [`Text`](/packages/components/src/text/README.md#props). ##### level diff --git a/packages/components/src/heading/index.ts b/packages/components/src/heading/index.ts index 4c59b9138c4f21..1371331423bdd6 100644 --- a/packages/components/src/heading/index.ts +++ b/packages/components/src/heading/index.ts @@ -1,2 +1,2 @@ -export { default } from './component'; -export * from './hook'; +export { default as Heading } from './component'; +export { useHeading } from './hook'; diff --git a/packages/components/src/heading/stories/index.js b/packages/components/src/heading/stories/index.js index eb42e295bddff7..0025005a772d69 100644 --- a/packages/components/src/heading/stories/index.js +++ b/packages/components/src/heading/stories/index.js @@ -1,11 +1,11 @@ /** * Internal dependencies */ -import Heading from '../index'; +import { Heading } from '../'; export default { component: Heading, - title: 'Components/Heading', + title: 'G2 Components (Experimental)/Heading', }; export const _default = () => { diff --git a/packages/components/src/heading/test/index.js b/packages/components/src/heading/test/index.js index 0bf0db57497e6f..edf9b0dbc7e717 100644 --- a/packages/components/src/heading/test/index.js +++ b/packages/components/src/heading/test/index.js @@ -6,7 +6,7 @@ import { render } from '@testing-library/react'; /** * Internal dependencies */ -import Heading from '../index'; +import { Heading } from '../'; describe( 'props', () => { let base; diff --git a/packages/components/src/index.js b/packages/components/src/index.js index facfef8d6a1b83..c37301e3a0206c 100644 --- a/packages/components/src/index.js +++ b/packages/components/src/index.js @@ -65,7 +65,7 @@ export { default as __experimentalGradientPicker } from './gradient-picker'; export { default as __experimentalCustomGradientPicker } from './custom-gradient-picker'; export { default as Guide } from './guide'; export { default as GuidePage } from './guide/page'; -export { default as __experimentalHeading } from './heading'; +export { Heading as __experimentalHeading } from './heading'; export { default as Icon } from './icon'; export { default as IconButton } from './button/deprecated'; export { default as __experimentalInputControl } from './input-control'; diff --git a/packages/components/src/ui/__storybook-utils/page.js b/packages/components/src/ui/__storybook-utils/page.js index a3b20f148ac9ef..130b5fdb3044d3 100644 --- a/packages/components/src/ui/__storybook-utils/page.js +++ b/packages/components/src/ui/__storybook-utils/page.js @@ -3,7 +3,7 @@ */ import { VStack } from '../v-stack'; import { View } from '../view'; -import Heading from '../../heading'; +import { Heading } from '../../heading'; import { Divider } from '../divider'; function Page( { title = 'Component', children } ) { diff --git a/packages/components/src/ui/card/stories/index.js b/packages/components/src/ui/card/stories/index.js index 00b6b5e58b85c7..fa6a90bad4afe2 100644 --- a/packages/components/src/ui/card/stories/index.js +++ b/packages/components/src/ui/card/stories/index.js @@ -6,7 +6,7 @@ import { Text } from '../../../text'; import { VStack } from '../../v-stack'; import { Card, CardBody, CardFooter } from '../index'; import { Divider } from '../../divider'; -import Heading from '../../../heading'; +import { Heading } from '../../../heading'; import Button from '../../../button'; export default {