Skip to content

Commit

Permalink
Move Help Text
Browse files Browse the repository at this point in the history
  • Loading branch information
enejb committed Jul 7, 2021
1 parent 54e4e0e commit ca68828
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,12 @@
"markdown_source": "../packages/components/src/heading/README.md",
"parent": "components"
},
{
"title": "HelpText",
"slug": "help-text",
"markdown_source": "../packages/components/src/help-text/README.md",
"parent": "components"
},
{
"title": "NavigateRegions",
"slug": "navigate-regions",
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions packages/components/src/help-text/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* WordPress dependencies
*/
import { ExternalLink } from '@wordpress/components';

const HelpText = ( { moreLinkText, children, url } ) => {
return (
<div>
{ children }
{ url && <ExternalLink url={ url }>{ moreLinkText }</ExternalLink> }
</div>
);
};

export default HelpText;
1 change: 1 addition & 0 deletions packages/components/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export { Grid as __experimentalGrid } from './grid';
export { default as Guide } from './guide';
export { default as GuidePage } from './guide/page';
export { Heading as __experimentalHeading } from './heading';
export { default as HelpText } from './help-text';
export { HStack as __experimentalHStack } from './h-stack';
export { default as Icon } from './icon';
export { default as IconButton } from './button/deprecated';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export { default as PanelActions } from './panel/actions';
export { default as Button } from './button';
export { default as __experimentalText } from './text';
export { default as ExternalLink } from './external-link';
export { default as HelpText } from './help-text';
export { default as TextControl } from './text-control';
export { default as ToggleControl } from './toggle-control';
export { default as SelectControl } from './select-control';
Expand Down Expand Up @@ -101,7 +102,6 @@ export { default as InserterButton } from './mobile/inserter-button';
export { setClipboard, getClipboard } from './mobile/clipboard';
export { default as AudioPlayer } from './mobile/audio-player';
export { default as Badge } from './mobile/badge';
export { default as HelpText } from './mobile/help-text';

// Utils
export { colorsUtils } from './mobile/color-settings/utils';
Expand Down

0 comments on commit ca68828

Please sign in to comment.