Skip to content

refactor: Ripple samples update for React v19 #832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: vnext
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 11 additions & 20 deletions samples/inputs/ripple/button/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import { IgrRipple, IgrRippleModule, IgrButton, IgrButtonModule } from 'igniteui-react';
import { IgrRipple, IgrButton } from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';

IgrRippleModule.register();
IgrButtonModule.register();
export default function RippleButton() {

export default class RippleButton extends React.Component<any, any> {

constructor(props: any) {
super(props);
}

public render(): JSX.Element {
return (
<div className="container-center sample">
<IgrButton>
<IgrRipple></IgrRipple>
<span>Ripple Button</span>
</IgrButton>
</div>
);
}
return (
<div className="container-center sample">
<IgrButton>
<IgrRipple></IgrRipple>
<span>Ripple Button</span>
</IgrButton>
</div>
);
}

// rendering above class to the React DOM
// rendering above component to the React DOM
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<RippleButton/>);
31 changes: 11 additions & 20 deletions samples/inputs/ripple/color/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import { IgrRipple, IgrRippleModule, IgrButton, IgrButtonModule } from 'igniteui-react';
import { IgrRipple, IgrButton } from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';

IgrRippleModule.register();
IgrButtonModule.register();
export default function RippleColor() {

export default class RippleColor extends React.Component<any, any> {

constructor(props: any) {
super(props);
}

public render(): JSX.Element {
return (
<div className="container-center sample">
<IgrButton>
<IgrRipple></IgrRipple>
<span>Ripple Button</span>
</IgrButton>
</div>
);
}
return (
<div className="container-center sample">
<IgrButton>
<IgrRipple></IgrRipple>
<span>Ripple Button</span>
</IgrButton>
</div>
);
}

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