Skip to content

Commit 236cf5c

Browse files
authored
remove: keys and deprecated modules from expansion panel samples (#854)
1 parent 4c69b0c commit 236cf5c

4 files changed

Lines changed: 24 additions & 34 deletions

File tree

samples/layouts/expansion-panel/component-customization/src/index.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
44
import './ExpansionPanelCustomization.css';
5-
import { IgrExpansionPanel, IgrButton, IgrButtonModule, IgrExpansionPanelModule } from 'igniteui-react';
5+
import { IgrExpansionPanel, IgrButton } from 'igniteui-react';
66
import 'igniteui-webcomponents/themes/light/bootstrap.css';
77

8-
IgrButtonModule.register();
9-
IgrExpansionPanelModule.register();
10-
118
export default class ExpansionPanelComponentCustomization extends React.Component<any, any> {
129

1310
constructor(props: any) {
@@ -22,16 +19,16 @@ export default class ExpansionPanelComponentCustomization extends React.Componen
2219
return (
2320
<div className="container sample">
2421
<IgrExpansionPanel onClosed={this.onExpansionPanelClosed} onOpened={this.onExpansionPanelOpened} indicatorPosition="end">
25-
<h1 key="epTitle" slot="title">Golden Retriever</h1>
26-
<h3 key="epSubtitle" slot="subtitle">Medium-large gun dog</h3>
27-
<div key="epIndicator" slot="indicator">{this.state.expansionText}</div>
28-
<img key="epImg" height="100" src="https://i.ibb.co/6ZdY7cn/Untitled-design-3.png" alt=""></img>
29-
<span key="epSpan">The Golden Retriever is a medium-large gun dog that retrieves shot waterfowl, such as ducks
22+
<h1 slot="title">Golden Retriever</h1>
23+
<h3 slot="subtitle">Medium-large gun dog</h3>
24+
<div slot="indicator">{this.state.expansionText}</div>
25+
<img height="100" src="https://i.ibb.co/6ZdY7cn/Untitled-design-3.png" alt=""></img>
26+
<span>The Golden Retriever is a medium-large gun dog that retrieves shot waterfowl, such as ducks
3027
and upland game birds, during hunting and shooting parties.[3] The name retriever refers to the breeds ability
3128
to retrieve shot game undamaged due to their soft mouth. Golden retrievers have an instinctive love of water, and
3229
are easy to train to basic or advanced obedience standards.</span>
33-
<IgrButton key="epBtn" href="https://en.wikipedia.org/wiki/Golden_Retriever" variant="outlined" target="_blank">
34-
<span key="btnSpan">Read more</span>
30+
<IgrButton href="https://en.wikipedia.org/wiki/Golden_Retriever" variant="outlined" target="_blank">
31+
<span>Read more</span>
3532
</IgrButton>
3633
</IgrExpansionPanel>
3734
</div>

samples/layouts/expansion-panel/properties-and-events/src/index.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
44
import './ExpansionPanelPropsAndEvents.css';
5-
import { IgrExpansionPanel, IgrExpansionPanelModule } from 'igniteui-react';
5+
import { IgrExpansionPanel } from 'igniteui-react';
66
import 'igniteui-webcomponents/themes/light/bootstrap.css';
77

8-
IgrExpansionPanelModule.register();
9-
108
export default class ExpansionPanelPropertiesAndEvents extends React.Component<any, any> {
119

1210
constructor(props: any) {
@@ -21,10 +19,10 @@ export default class ExpansionPanelPropertiesAndEvents extends React.Component<a
2119
return (
2220
<div className="container sample center">
2321
<IgrExpansionPanel onClosed={this.onExpansionPanelClosed} onOpened={this.onExpansionPanelOpened}>
24-
<h1 key="epTitle" slot="title">Golden Retriever</h1>
25-
<h3 key="epSubtitle" className={this.state.subtitleClass} slot="subtitle">Medium-large gun dog</h3>
26-
<div key="epIndicator" slot="indicator">{this.state.expansionText}</div>
27-
<span key="epSpan">The Golden Retriever is a medium-large gun dog that retrieves shot waterfowl, such as ducks
22+
<h1 slot="title">Golden Retriever</h1>
23+
<h3 className={this.state.subtitleClass} slot="subtitle">Medium-large gun dog</h3>
24+
<div slot="indicator">{this.state.expansionText}</div>
25+
<span>The Golden Retriever is a medium-large gun dog that retrieves shot waterfowl, such as ducks
2826
and upland game birds, during hunting and shooting parties.[3] The name retriever refers to the breeds ability
2927
to retrieve shot game undamaged due to their soft mouth. Golden retrievers have an instinctive love of water, and
3028
are easy to train to basic or advanced obedience standards.</span>

samples/layouts/expansion-panel/styling/src/index.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
44
import './ExpansionPanelStyling.css';
5-
import { IgrExpansionPanel, IgrButton, IgrButtonModule, IgrExpansionPanelModule } from 'igniteui-react';
5+
import { IgrExpansionPanel, IgrButton } from 'igniteui-react';
66
import 'igniteui-webcomponents/themes/light/bootstrap.css';
77

8-
IgrButtonModule.register();
9-
IgrExpansionPanelModule.register();
10-
118
export default class ExpansionPanelStyling extends React.Component<any, any> {
129

1310
constructor(props: any) {
@@ -18,15 +15,15 @@ export default class ExpansionPanelStyling extends React.Component<any, any> {
1815
return (
1916
<div className="container sample">
2017
<IgrExpansionPanel indicatorPosition="end">
21-
<h1 key="epTitle" slot="title">Golden Retriever</h1>
22-
<h3 key="epSubtitle" slot="subtitle">Medium-large gun dog</h3>
23-
<img key="epImg" height="100" src="https://i.ibb.co/6ZdY7cn/Untitled-design-3.png" alt=""></img>
24-
<span key="epSpan">The Golden Retriever is a medium-large gun dog that retrieves shot waterfowl, such as ducks
18+
<h1 slot="title">Golden Retriever</h1>
19+
<h3 slot="subtitle">Medium-large gun dog</h3>
20+
<img height="100" src="https://i.ibb.co/6ZdY7cn/Untitled-design-3.png" alt=""></img>
21+
<span>The Golden Retriever is a medium-large gun dog that retrieves shot waterfowl, such as ducks
2522
and upland game birds, during hunting and shooting parties.[3] The name retriever refers to the breeds ability
2623
to retrieve shot game undamaged due to their soft mouth. Golden retrievers have an instinctive love of water, and
2724
are easy to train to basic or advanced obedience standards.</span>
28-
<IgrButton key="epBtn" href="https://en.wikipedia.org/wiki/Golden_Retriever" variant="contained" target="_blank">
29-
<span key="btnCaption">Read more</span>
25+
<IgrButton href="https://en.wikipedia.org/wiki/Golden_Retriever" variant="contained" target="_blank">
26+
<span>Read more</span>
3027
</IgrButton>
3128
</IgrExpansionPanel>
3229
</div>

samples/layouts/expansion-panel/usage/src/index.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import React from 'react';
22
import ReactDOM from 'react-dom/client';
33
import './index.css';
44
import './ExpansionPanelUsage.css';
5-
import { IgrExpansionPanel, IgrExpansionPanelModule } from 'igniteui-react';
5+
import { IgrExpansionPanel } from 'igniteui-react';
66
import 'igniteui-webcomponents/themes/light/bootstrap.css';
77

8-
IgrExpansionPanelModule.register();
9-
108
export default class ExpansionPanelUsage extends React.Component<any, any> {
119

1210
constructor(props: any) {
@@ -17,9 +15,9 @@ export default class ExpansionPanelUsage extends React.Component<any, any> {
1715
return (
1816
<div className="container sample">
1917
<IgrExpansionPanel>
20-
<h1 key="epTitle" slot="title">Golden Retriever</h1>
21-
<h3 key="epSubtitle" slot="subtitle">Medium-large gun dog</h3>
22-
<span key="epSpan">The Golden Retriever is a medium-large gun dog that retrieves shot waterfowl, such as ducks
18+
<h1 slot="title">Golden Retriever</h1>
19+
<h3 slot="subtitle">Medium-large gun dog</h3>
20+
<span>The Golden Retriever is a medium-large gun dog that retrieves shot waterfowl, such as ducks
2321
and upland game birds, during hunting and shooting parties.[3] The name retriever refers to the breeds ability
2422
to retrieve shot game undamaged due to their soft mouth. Golden retrievers have an instinctive love of water, and
2523
are easy to train to basic or advanced obedience standards.</span>

0 commit comments

Comments
 (0)