Skip to content

Commit 6d6dde4

Browse files
author
Mariela Tihova
authored
Update Ripple samples for React 19 (#832)
1 parent c80ff5a commit 6d6dde4

2 files changed

Lines changed: 22 additions & 40 deletions

File tree

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
4-
import { IgrRipple, IgrRippleModule, IgrButton, IgrButtonModule } from 'igniteui-react';
4+
import { IgrRipple, IgrButton } from 'igniteui-react';
55
import 'igniteui-webcomponents/themes/light/bootstrap.css';
66

7-
IgrRippleModule.register();
8-
IgrButtonModule.register();
7+
export default function RippleButton() {
98

10-
export default class RippleButton extends React.Component<any, any> {
11-
12-
constructor(props: any) {
13-
super(props);
14-
}
15-
16-
public render(): JSX.Element {
17-
return (
18-
<div className="container-center sample">
19-
<IgrButton>
20-
<IgrRipple></IgrRipple>
21-
<span>Ripple Button</span>
22-
</IgrButton>
23-
</div>
24-
);
25-
}
9+
return (
10+
<div className="container-center sample">
11+
<IgrButton>
12+
<IgrRipple></IgrRipple>
13+
<span>Ripple Button</span>
14+
</IgrButton>
15+
</div>
16+
);
2617
}
2718

28-
// rendering above class to the React DOM
19+
// rendering above component to the React DOM
2920
const root = ReactDOM.createRoot(document.getElementById('root'));
3021
root.render(<RippleButton/>);
Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
4-
import { IgrRipple, IgrRippleModule, IgrButton, IgrButtonModule } from 'igniteui-react';
4+
import { IgrRipple, IgrButton } from 'igniteui-react';
55
import 'igniteui-webcomponents/themes/light/bootstrap.css';
66

7-
IgrRippleModule.register();
8-
IgrButtonModule.register();
7+
export default function RippleColor() {
98

10-
export default class RippleColor extends React.Component<any, any> {
11-
12-
constructor(props: any) {
13-
super(props);
14-
}
15-
16-
public render(): JSX.Element {
17-
return (
18-
<div className="container-center sample">
19-
<IgrButton>
20-
<IgrRipple></IgrRipple>
21-
<span>Ripple Button</span>
22-
</IgrButton>
23-
</div>
24-
);
25-
}
9+
return (
10+
<div className="container-center sample">
11+
<IgrButton>
12+
<IgrRipple></IgrRipple>
13+
<span>Ripple Button</span>
14+
</IgrButton>
15+
</div>
16+
);
2617
}
2718

28-
// rendering above class to the React DOM
19+
// rendering above component to the React DOM
2920
const root = ReactDOM.createRoot(document.getElementById('root'));
3021
root.render(<RippleColor/>);

0 commit comments

Comments
 (0)