Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit 15ac4b4

Browse files
QuicheSamaindexzero
authored andcommitted
[fix] Allow props to be passed down to child component (#5)
* [feature] support pass-through of react-markdown props * [fix] adjust props to allow for overriding * [fix] re-add proptypes and remove default props * [fix] change prop names to be consistent and fixed broken tests * update changelog * [fix] update Changelog with **BREAKING** annotation * update changelog with missing link * [fix] remove rip-out and rearrange prop spreading
1 parent bb90a00 commit 15ac4b4

5 files changed

Lines changed: 1388 additions & 1383 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# `react-markdown-github`
22

3+
- [#5] **BREAKING** Change `resolver` prop to `transformLinkUri` to be consistent with `react-markdown`
4+
- Create prop pass-through to provide props to `react-markdown`
5+
36
### 2.0.0
47

58
- [#2] **BREAKING** Handle hash URLs, provide both `{ filename, filepath }`.
@@ -17,3 +20,8 @@
1720
### 1.0.0
1821

1922
- Initial release
23+
24+
[#1]: https://github.com/godaddy/react-markdown-github/pull/1
25+
[#2]: https://github.com/godaddy/react-markdown-github/pull/2
26+
[#3]: https://github.com/godaddy/react-markdown-github/pull/3
27+
[#5]: https://github.com/godaddy/react-markdown-github/pull/5

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm install react-markdown-github
1818
<MarkdownGithub
1919
  source={ markdown }
2020
  sourceUri='https://github.mycorp.com/org/component/blob/master/README.md'
21-
  resolver={ ({ uri, github, org, repo, filename, filepath }) => { } }
21+
  transformLinkUri={ ({ uri, github, org, repo, filename, filepath }) => { } }
2222
transformImageUri={ ({ uri, github, org, repo, filename }) => {} }
2323
  renderers={ code: myCodeFormatter }
2424
  className='myClass' />
@@ -28,7 +28,7 @@ npm install react-markdown-github
2828

2929
- `sourceUri` Absolute URL to orgional markdown. All relative links will be
3030
resolved relative to this URL.
31-
- `resolver` URL resolver function. To override the URL resolver and point a url
31+
- `transformLinkUri` URL resolver function. To override the URL resolver and point a url
3232
to an alternate location.
3333
- `transformImageUri` image URL resolver function. Default behavior is to not modify image urls.
3434
- `renderers` An object of render function values with keys corresponding to

0 commit comments

Comments
 (0)