Skip to content

Commit bcfe6e7

Browse files
igeligeltleunen
authored andcommitted
Add examples in readme (#8)
Extend readme with preview image and examples to code sandboxes
1 parent 93d2705 commit bcfe6e7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
Use this component to add a github gist on your website.
66

7+
<p><details>
8+
<summary><b>Preview</b></summary>
9+
<p><img src="https://i.imgur.com/4EYDskB.png" /></p>
10+
</details></p>
11+
712
Get the id from the gist url `https://gist.github.com/{your_name}/{id}` and set it as a property of the component.
813

914
## Example
@@ -20,6 +25,8 @@ React.render(
2025
);
2126
```
2227

28+
[![Edit react-gist-example-single-file](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/reactgistexamplesinglefile-z9vkc?fontsize=14)
29+
2330
Multi-file gist:
2431

2532
```js
@@ -32,6 +39,8 @@ React.render(
3239
);
3340
```
3441

42+
[![Edit react-gist-example-multi-file](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/reactgistexamplemultifile-9rw4g?fontsize=14)
43+
3544
## Usage
3645

3746
### `<Gist id={string} file={string} />`

0 commit comments

Comments
 (0)