|
1 | 1 | import React from 'react' |
2 | | -import { Message } from 'semantic-ui-react' |
| 2 | +import { Message, Icon } from 'semantic-ui-react' |
3 | 3 |
|
4 | 4 | import Types from './Types' |
5 | 5 |
|
6 | 6 | const RefExamples = () => ( |
7 | 7 | <> |
8 | | - <Message info> |
9 | | - <p> |
10 | | - Currently, it's recommended to use <code>Ref</code> component to get |
11 | | - refs to HTML elements from Semantic UI React components as not all |
12 | | - components support native ref forwarding via{' '} |
13 | | - <code>React.forwardRef()</code>. |
14 | | - </p> |
15 | | - <p> |
16 | | - As it uses deprecated <code>ReactDOM.findDOMNode()</code> you may |
17 | | - receive warnings in React's StrictMode. We are working on it in{' '} |
18 | | - <a href='https://github.com/Semantic-Org/Semantic-UI-React/issues/3819'> |
19 | | - Semantic-Org/Semantic-UI-React#3819 |
20 | | - </a> |
21 | | - . |
22 | | - </p> |
| 8 | + <Message icon warning> |
| 9 | + <Icon name='warning sign' /> |
| 10 | + |
| 11 | + <Message.Content> |
| 12 | + <Message.Header>Deprecation notice</Message.Header> |
| 13 | + <p> |
| 14 | + <code>Ref</code> component is deprecated and will be removed in the |
| 15 | + next major release. Please follow our{' '} |
| 16 | + <a href='https://github.com/Semantic-Org/Semantic-UI-React/pull/4324'> |
| 17 | + upgrade guide |
| 18 | + </a>{' '} |
| 19 | + to avoid breaks during upgrade to v3. |
| 20 | + </p> |
| 21 | + <p> |
| 22 | + It's still recommended to use <code>Ref</code> component with v2 to |
| 23 | + get refs to HTML elements from Semantic UI React components, but as it |
| 24 | + uses deprecated <code>ReactDOM.findDOMNode()</code> you may receive |
| 25 | + warnings in React's StrictMode. We are working on it in{' '} |
| 26 | + <a href='https://github.com/Semantic-Org/Semantic-UI-React/issues/3819'> |
| 27 | + Semantic-Org/Semantic-UI-React#3819 |
| 28 | + </a> |
| 29 | + . |
| 30 | + </p> |
| 31 | + </Message.Content> |
23 | 32 | </Message> |
| 33 | + |
24 | 34 | <Types /> |
25 | 35 | </> |
26 | 36 | ) |
|
0 commit comments