From 0c82978618cc51b57397ee2b30136bb48d47968f Mon Sep 17 00:00:00 2001 From: Siobhan Date: Fri, 16 Sep 2022 15:42:46 +0100 Subject: [PATCH] Update README for ExternalLink for accuracy This README has been updated since this PR was first worked on (in https://github.com/WordPress/gutenberg/pull/41681/). As such, this commit brings in the latest updates for accuracy. --- .../components/src/external-link/README.md | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/packages/components/src/external-link/README.md b/packages/components/src/external-link/README.md index 2ed515ca7e54d..c0e5621154cc2 100644 --- a/packages/components/src/external-link/README.md +++ b/packages/components/src/external-link/README.md @@ -1,6 +1,6 @@ # ExternalLink -Renders a hyperlink that, when tapped or clicked, opens in a new window. +Link to an external resource. ## Usage @@ -14,27 +14,16 @@ const MyExternalLink = () => ( ## Props -The text that's displayed within the component's tags will be "clickable" and link to any URL provided via the `href` prop. As outlined below, the `href` prop is the only required prop. +The component accepts the following props. Any other props will be passed through to the `a`. -There are two other optional props that are web only. That is, they're not available for use with the React Native implementation of the editor. +### `children`: `ReactNode` -### `href` +The content to be displayed within the link. -The URL that is being linked to and will open in a new window when tapped or clicked. - -- Type: `String` - Required: Yes -### `className` (web only) - -An optional CSS class that's added to the hyperlink's HTML. - -- Type: `String` -- Required: No +### `href`: `string` -### `rel` (web only) +The URL of the external resource. -A rel attribute. - -- Type: `String` -- Required: No +- Required: Yes