Skip to content

Commit cbb549f

Browse files
Copilotdamyanpetev
andauthored
feat(igr-ts): add missing component templates to match (igc-ts) selection (#1576)
Co-authored-by: Damyan Petev <damyanpetev@users.noreply.github.com>
1 parent a119ad1 commit cbb549f

155 files changed

Lines changed: 2091 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { beforeAll, expect, test } from 'vitest';
2+
import { render } from '@testing-library/react';
3+
import $(ClassName) from './$(path)';
4+
import { setupTestMocks } from '../../setupTests';
5+
6+
beforeAll(() => {
7+
setupTestMocks();
8+
})
9+
10+
test('renders $(ClassName) component', () => {
11+
const wrapper = render(<$(ClassName) />);
12+
expect(wrapper).toBeTruthy();
13+
});
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import style from './style.module.css';
2+
import { IgrAccordion, IgrExpansionPanel } from 'igniteui-react';
3+
import 'igniteui-webcomponents/themes/light/bootstrap.css';
4+
5+
export default function $(ClassName)() {
6+
return (
7+
<div>
8+
<h1 className={style.title}>Accordion</h1>
9+
<div className={style.container}>
10+
<IgrAccordion singleExpand={false}>
11+
<IgrExpansionPanel>
12+
<div slot="title">Ignite UI for React</div>
13+
<p>Ignite UI for React is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.</p>
14+
</IgrExpansionPanel>
15+
<IgrExpansionPanel>
16+
<div slot="title">Ignite UI for Angular</div>
17+
<p>Ignite UI for Angular is a complete set of Material-based UI Widgets, Components and Sketch UI kits by Infragistics.</p>
18+
</IgrExpansionPanel>
19+
<IgrExpansionPanel>
20+
<div slot="title">Ignite UI for Web Components</div>
21+
<p>Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications.</p>
22+
</IgrExpansionPanel>
23+
</IgrAccordion>
24+
</div>
25+
</div>
26+
);
27+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:local(.container) {
2+
padding-top: 24px;
3+
display: flex;
4+
flex-flow: row;
5+
justify-content: space-around;
6+
}
7+
:local(.title) {
8+
color: rgb(0, 153, 255);
9+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate";
2+
3+
class IgrAccordionTemplate extends IgniteUIForReactTemplate {
4+
constructor() {
5+
super(__dirname);
6+
this.components = ["Accordion"];
7+
this.controlGroup = "Layouts";
8+
this.listInComponentTemplates = true;
9+
this.id = "accordion";
10+
this.projectType = "igr-ts";
11+
this.name = "Accordion";
12+
this.description = "basic IgrAccordion";
13+
this.packages = ["igniteui-react@~19.5.2"];
14+
}
15+
}
16+
module.exports = new IgrAccordionTemplate();
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { BaseComponent } from "@igniteui/cli-core";
2+
3+
class IgrAccordionComponent extends BaseComponent {
4+
constructor() {
5+
super(__dirname);
6+
this.name = "Accordion";
7+
this.group = "Layouts";
8+
this.description = `enables displaying of content in a vertically collapsible fashion.`;
9+
}
10+
}
11+
module.exports = new IgrAccordionComponent();
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { beforeAll, expect, test } from 'vitest';
2+
import { render } from '@testing-library/react';
3+
import $(ClassName) from './$(path)';
4+
import { setupTestMocks } from '../../setupTests';
5+
6+
beforeAll(() => {
7+
setupTestMocks();
8+
})
9+
10+
test('renders $(ClassName) component', () => {
11+
const wrapper = render(<$(ClassName) />);
12+
expect(wrapper).toBeTruthy();
13+
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import style from './style.module.css';
2+
import { IgrAvatar } from 'igniteui-react';
3+
import 'igniteui-webcomponents/themes/light/bootstrap.css';
4+
5+
export default function $(ClassName)() {
6+
return (
7+
<div>
8+
<h1 className={style.title}>Avatar</h1>
9+
<div className={style.container}>
10+
<IgrAvatar shape="circle" size="large" initials="JD" />
11+
<IgrAvatar shape="rounded" size="medium" initials="AB" />
12+
<IgrAvatar shape="circle" size="small" initials="CD" />
13+
</div>
14+
</div>
15+
);
16+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
:local(.container) {
2+
padding-top: 24px;
3+
display: flex;
4+
flex-flow: row;
5+
justify-content: space-around;
6+
}
7+
:local(.title) {
8+
color: rgb(0, 153, 255);
9+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate";
2+
3+
class IgrAvatarTemplate extends IgniteUIForReactTemplate {
4+
constructor() {
5+
super(__dirname);
6+
this.components = ["Avatar"];
7+
this.controlGroup = "Layouts";
8+
this.listInComponentTemplates = true;
9+
this.id = "avatar";
10+
this.projectType = "igr-ts";
11+
this.name = "Avatar";
12+
this.description = "displays an avatar with customizable shape, size, and initials.";
13+
this.packages = ["igniteui-react@~19.5.2"];
14+
}
15+
}
16+
module.exports = new IgrAvatarTemplate();
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { BaseComponent } from "@igniteui/cli-core";
2+
3+
class IgrAvatarComponent extends BaseComponent {
4+
constructor() {
5+
super(__dirname);
6+
this.name = "Avatar";
7+
this.group = "Layouts";
8+
this.description = `displays an avatar with customizable shape, size, and initials.`;
9+
}
10+
}
11+
module.exports = new IgrAvatarComponent();

0 commit comments

Comments
 (0)