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

Commit 331f7d6

Browse files
committed
fix props and update package.json
1 parent 2ddcac8 commit 331f7d6

File tree

3 files changed

+19
-20
lines changed

3 files changed

+19
-20
lines changed

examples/linkify-example/package-lock.json

Lines changed: 12 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/linkify-example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"dependencies": {
88
"@djsp/core": "^0.1.5",
99
"linkify-it": "^2.0.3",
10-
"react": "^16.2.0",
11-
"react-dom": "^16.2.0",
10+
"react": "16.5.0",
11+
"react-dom": "16.5.0",
1212
"react-scripts": "^1.1.1",
1313
"tlds": "^1.203.1"
1414
},

examples/linkify-example/src/Link.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@ type Props = DraftDecoratorComponentProps & {
1818
class LinkComponent extends Component<Props> {
1919
render() {
2020
const {
21-
decoratedText, // eslint-disable-line no-unused-vars
21+
decoratedText,
2222
target = '_self',
2323
rel = 'noreferrer noopener',
24-
...otherProps
25-
} = this.props // eslint-disable-line no-use-before-define
24+
children,
25+
} = this.props
2626

2727
const links = linkify.match(decoratedText)
2828
const href = links && links[0] ? links[0].url : ''
2929

3030
const props = {
31-
...otherProps,
3231
href,
32+
children,
3333
target,
3434
rel,
3535
className: 'link',
3636
}
3737

38-
return <a {...props} /> // eslint-disable-line jsx-a11y/anchor-has-content
38+
return <a {...props} />
3939
}
4040
}
4141

0 commit comments

Comments
 (0)