Skip to content

Commit

Permalink
Copy props to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Dec 12, 2022
1 parent d99f3e2 commit 2eac8cf
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions packages/components/src/sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,46 @@ const MySandBox = () => (
<SandBox html="<p>Content</p>" title="SandBox" type="embed" />
);
```

## Props

### `html`: `string`

The HTML to render in the body of the iframe document.

- Required: No
- Default: ""

### `onFocus`: `React.DOMAttributes< HTMLIFrameElement >[ 'onFocus' ]`

The `onFocus` callback for the iframe.

- Required: No

### `scripts`: `string[]`

An array of script URLs to inject as `<script>` tags into the bottom of the `<body>` of the iframe document.

- Required: No
- Default: []

### `styles`: `string[]`

An array of CSS strings to inject into the `<head>` of the iframe document.

- Required: No
- Default: []

### `title`: `string`

The `<title>` of the iframe document.

- Required: No
- Default: ""

### `type`: `string`

The CSS class name to apply to the `<html>` and `<body>` elements of the iframe.

- Required: No
- Default: ""

0 comments on commit 2eac8cf

Please sign in to comment.