File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom/client' ;
33import './index.css' ;
4- import { IgrSwitch , IgrSwitchModule } from 'igniteui-react' ;
4+ import { IgrSwitch } from 'igniteui-react' ;
55import 'igniteui-webcomponents/themes/light/bootstrap.css' ;
66
7- IgrSwitchModule . register ( ) ;
7+ export default function SwitchOutlined ( ) {
88
9- export default class SwitchOutlined extends React . Component < any , any > {
10-
11- constructor ( props : any ) {
12- super ( props ) ;
13- }
14-
15- public render ( ) : JSX . Element {
16- return (
17- < div className = "container sample" >
18- < IgrSwitch checked = { true } > < span > Label</ span > </ IgrSwitch >
19- </ div >
20- ) ;
21- }
9+ return (
10+ < div className = "container sample" >
11+ < IgrSwitch checked = { true } > < span > Label</ span > </ IgrSwitch >
12+ </ div >
13+ ) ;
2214}
2315
24- // rendering above class to the React DOM
16+ // rendering above component to the React DOM
2517const root = ReactDOM . createRoot ( document . getElementById ( 'root' ) ) ;
2618root . render ( < SwitchOutlined /> ) ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom/client' ;
33import './index.css' ;
4- import { IgrSwitch , IgrSwitchModule } from 'igniteui-react' ;
4+ import { IgrSwitch } from 'igniteui-react' ;
55import 'igniteui-webcomponents/themes/light/bootstrap.css' ;
66
7- IgrSwitchModule . register ( ) ;
7+ export default function SwitchDisabled ( ) {
88
9- export default class SwitchDisabled extends React . Component < any , any > {
10-
11- constructor ( props : any ) {
12- super ( props ) ;
13- }
14-
15- public render ( ) : JSX . Element {
16- return (
17- < div className = "container sample" >
18- < IgrSwitch disabled = { true } />
19- </ div >
20- ) ;
21- }
9+ return (
10+ < div className = "container sample" >
11+ < IgrSwitch disabled = { true } />
12+ </ div >
13+ ) ;
2214}
2315
24- // rendering above class to the React DOM
16+ // rendering above component to the React DOM
2517const root = ReactDOM . createRoot ( document . getElementById ( 'root' ) ) ;
2618root . render ( < SwitchDisabled /> ) ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom/client' ;
33import './index.css' ;
4- import { IgrSwitch , IgrSwitchModule } from 'igniteui-react' ;
4+ import { IgrSwitch } from 'igniteui-react' ;
55import 'igniteui-webcomponents/themes/light/bootstrap.css' ;
66
7- IgrSwitchModule . register ( ) ;
7+ export default function SwitchLabel ( ) {
88
9- export default class SwitchLabel extends React . Component < any , any > {
10-
11- constructor ( props : any ) {
12- super ( props ) ;
13- }
14-
15- public render ( ) : JSX . Element {
16- return (
17- < div className = "sample" >
18- < IgrSwitch aria-labelledby = "switchLabel" labelPosition = "before" > < span id = "switch-label" > Label</ span > </ IgrSwitch >
19- </ div >
20- ) ;
21- }
9+ return (
10+ < div className = "sample" >
11+ < IgrSwitch aria-labelledby = "switchLabel" labelPosition = "before" > < span id = "switch-label" > Label</ span > </ IgrSwitch >
12+ </ div >
13+ ) ;
2214}
2315
24- // rendering above class to the React DOM
16+ // rendering above component to the React DOM
2517const root = ReactDOM . createRoot ( document . getElementById ( 'root' ) ) ;
2618root . render ( < SwitchLabel /> ) ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom/client' ;
33import './index.css' ;
4- import { IgrSwitch , IgrSwitchModule } from 'igniteui-react' ;
4+ import { IgrSwitch } from 'igniteui-react' ;
55import 'igniteui-webcomponents/themes/light/bootstrap.css' ;
66
7- IgrSwitchModule . register ( ) ;
7+ export default function SwitchOverview ( ) {
88
9- export default class SwitchOverview extends React . Component < any , any > {
10-
11- constructor ( props : any ) {
12- super ( props ) ;
13- }
14-
15- public render ( ) : JSX . Element {
16- return (
17- < div className = "container sample" >
18- < IgrSwitch > </ IgrSwitch >
19- </ div >
20- ) ;
21- }
9+ return (
10+ < div className = "container sample" >
11+ < IgrSwitch > </ IgrSwitch >
12+ </ div >
13+ ) ;
2214}
2315
24- // rendering above class to the React DOM
16+ // rendering above component to the React DOM
2517const root = ReactDOM . createRoot ( document . getElementById ( 'root' ) ) ;
2618root . render ( < SwitchOverview /> ) ;
You can’t perform that action at this time.
0 commit comments