11import React from 'react' ;
22import ReactDOM from 'react-dom/client' ;
33import './index.css' ;
4- import { IgrCalendar , IgrRadioGroup , IgrRadio , IgrCalendarModule , IgrRadioGroupModule , IgrRadioModule } from 'igniteui-react' ;
4+ import { IgrCalendar , IgrRadioGroup , IgrRadio } from 'igniteui-react' ;
55import 'igniteui-webcomponents/themes/light/bootstrap.css' ;
66
7- IgrCalendarModule . register ( ) ;
8- IgrRadioGroupModule . register ( ) ;
9- IgrRadioModule . register ( ) ;
10-
117export default class CalendarSize extends React . Component < any , any > {
128
139 constructor ( props : any ) {
@@ -20,17 +16,22 @@ export default class CalendarSize extends React.Component<any, any> {
2016 return (
2117 < div className = "container sample" >
2218 < IgrRadioGroup alignment = "horizontal" style = { { marginBottom : '10px' } } >
23- < IgrRadio name = "size" value = "small" onChange = { this . onRadioChange } >
19+ < IgrRadio name = "size" value = "small"
20+ checked = { this . state . calendarSize === "small" }
21+ onChange = { this . onRadioChange } >
2422 < span > Small</ span >
2523 </ IgrRadio >
26- < IgrRadio name = "size" value = "medium" onChange = { this . onRadioChange } >
24+ < IgrRadio name = "size" value = "medium"
25+ checked = { this . state . calendarSize === "medium" }
26+ onChange = { this . onRadioChange } >
2727 < span > Medium</ span >
2828 </ IgrRadio >
29- < IgrRadio name = "size" value = "large" checked = { true } onChange = { this . onRadioChange } >
29+ < IgrRadio name = "size" value = "large"
30+ checked = { this . state . calendarSize === "large" }
31+ onChange = { this . onRadioChange } >
3032 < span > Large</ span >
3133 </ IgrRadio >
3234 </ IgrRadioGroup >
33-
3435 < IgrCalendar className = { 'size-' + this . state . calendarSize } style = { { width : '400px' } } />
3536 </ div >
3637 ) ;
@@ -45,4 +46,4 @@ export default class CalendarSize extends React.Component<any, any> {
4546
4647// rendering above class to the React DOM
4748const root = ReactDOM . createRoot ( document . getElementById ( 'root' ) ) ;
48- root . render ( < CalendarSize /> ) ;
49+ root . render ( < CalendarSize /> ) ;
0 commit comments