Skip to content

Commit 65cbaea

Browse files
Copilotdamyanpetev
andauthored
Add React component templates for tabs, calendar, date-picker, list, tree, banner, navbar, form, linear-progress, circular-progress, slider, ripple, and subscription-form
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
1 parent 6107f2a commit 65cbaea

83 files changed

Lines changed: 1157 additions & 0 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-react/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 = ["IgrAccordion"];
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 { IgrBanner } from 'igniteui-react';
3+
import 'igniteui-react/themes/light/bootstrap.css';
4+
5+
export default function $(ClassName)() {
6+
return (
7+
<div>
8+
<h1 className={style.title}>Banner</h1>
9+
<div className={style.container}>
10+
<IgrBanner open={true}>
11+
You are currently not logged in! Please, log into your account first.
12+
</IgrBanner>
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 IgrBannerTemplate extends IgniteUIForReactTemplate {
4+
constructor() {
5+
super(__dirname);
6+
this.components = ["Banner"];
7+
this.controlGroup = "Notifications";
8+
this.listInComponentTemplates = true;
9+
this.id = "banner";
10+
this.projectType = "igr-ts";
11+
this.name = "Banner";
12+
this.description = "basic IgrBanner";
13+
this.packages = ["igniteui-react@~19.5.2"];
14+
}
15+
}
16+
module.exports = new IgrBannerTemplate();
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 IgrBannerComponent extends BaseComponent {
4+
constructor() {
5+
super(__dirname);
6+
this.name = "Banner";
7+
this.group = "Notifications";
8+
this.description = `displays banner component`;
9+
}
10+
}
11+
module.exports = new IgrBannerComponent();

0 commit comments

Comments
 (0)