Skip to content

Commit

Permalink
Update README for ExternalLink for accuracy
Browse files Browse the repository at this point in the history
This README has been updated since this PR was first worked on (in #41681). As such, this commit brings in the latest updates for accuracy.
  • Loading branch information
Siobhan committed Sep 16, 2022
1 parent 85f8a01 commit 0c82978
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions packages/components/src/external-link/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ExternalLink

Renders a hyperlink that, when tapped or clicked, opens in a new window.
Link to an external resource.

## Usage

Expand All @@ -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 <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel">rel attribute</>.

- Type: `String`
- Required: No
- Required: Yes

0 comments on commit 0c82978

Please sign in to comment.