-
Notifications
You must be signed in to change notification settings - Fork 8
feat(igr-ts): add missing component templates to match (igc-ts) selection #1576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
damyanpetev
merged 14 commits into
master
from
copilot/add-missing-react-component-templates
Apr 1, 2026
Merged
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9659f05
feat(igr-ts): add avatar, badge, and button React component templates
Copilot 7ee84fb
Add React component templates for button-group, checkbox, and chip
Copilot 85f7a5d
feat: add React component templates for icon, icon-button, input, rad…
Copilot 6107f2a
Add React component templates for rating, switch, text-area, and drop…
Copilot 65cbaea
Add React component templates for tabs, calendar, date-picker, list, …
Copilot 61d2f69
Add descriptions to all groups in React igr-ts groups.json
Copilot 106f026
Merge branch 'master' into copilot/add-missing-react-component-templates
Hristo313 87759d4
fix: use igniteui-webcomponents/themes instead of igniteui-react/them…
Copilot 7851f8a
Merge branch 'master' into copilot/add-missing-react-component-templates
Hristo313 3aaed12
fix: update tabs template to use correct React API (IgrTab with label…
Copilot 4d3097c
fix: address all unresolved review comments on React igr-ts templates
Copilot 33a0630
Apply suggestion from @damyanpetev
damyanpetev 743aeb8
Merge branch 'master' into copilot/add-missing-react-component-templates
Hristo313 90688fa
Merge branch 'master' into copilot/add-missing-react-component-templates
damyanpetev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...i/templates/react/igr-ts/accordion/default/files/src/app/__path__/__filePrefix__.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { beforeAll, expect, test } from 'vitest'; | ||
| import { render } from '@testing-library/react'; | ||
| import $(ClassName) from './$(path)'; | ||
| import { setupTestMocks } from '../../setupTests'; | ||
|
|
||
| beforeAll(() => { | ||
| setupTestMocks(); | ||
| }) | ||
|
|
||
| test('renders $(ClassName) component', () => { | ||
| const wrapper = render(<$(ClassName) />); | ||
| expect(wrapper).toBeTruthy(); | ||
| }); |
27 changes: 27 additions & 0 deletions
27
...es/cli/templates/react/igr-ts/accordion/default/files/src/app/__path__/__filePrefix__.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import style from './style.module.css'; | ||
| import { IgrAccordion, IgrExpansionPanel } from 'igniteui-react'; | ||
| import 'igniteui-webcomponents/themes/light/bootstrap.css'; | ||
|
|
||
| export default function $(ClassName)() { | ||
| return ( | ||
| <div> | ||
| <h1 className={style.title}>Accordion</h1> | ||
| <div className={style.container}> | ||
| <IgrAccordion singleExpand={false}> | ||
| <IgrExpansionPanel> | ||
| <div slot="title">Ignite UI for React</div> | ||
| <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> | ||
| </IgrExpansionPanel> | ||
| <IgrExpansionPanel> | ||
| <div slot="title">Ignite UI for Angular</div> | ||
| <p>Ignite UI for Angular is a complete set of Material-based UI Widgets, Components and Sketch UI kits by Infragistics.</p> | ||
| </IgrExpansionPanel> | ||
| <IgrExpansionPanel> | ||
| <div slot="title">Ignite UI for Web Components</div> | ||
| <p>Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications.</p> | ||
| </IgrExpansionPanel> | ||
| </IgrAccordion> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
9 changes: 9 additions & 0 deletions
9
...ages/cli/templates/react/igr-ts/accordion/default/files/src/app/__path__/style.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| :local(.container) { | ||
| padding-top: 24px; | ||
| display: flex; | ||
| flex-flow: row; | ||
| justify-content: space-around; | ||
| } | ||
| :local(.title) { | ||
| color: rgb(0, 153, 255); | ||
| } |
16 changes: 16 additions & 0 deletions
16
packages/cli/templates/react/igr-ts/accordion/default/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; | ||
|
|
||
| class IgrAccordionTemplate extends IgniteUIForReactTemplate { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.components = ["IgrAccordion"]; | ||
| this.controlGroup = "Layouts"; | ||
| this.listInComponentTemplates = true; | ||
| this.id = "accordion"; | ||
| this.projectType = "igr-ts"; | ||
| this.name = "Accordion"; | ||
| this.description = "basic IgrAccordion"; | ||
| this.packages = ["igniteui-react@~19.5.2"]; | ||
| } | ||
| } | ||
| module.exports = new IgrAccordionTemplate(); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { BaseComponent } from "@igniteui/cli-core"; | ||
|
|
||
| class IgrAccordionComponent extends BaseComponent { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.name = "Accordion"; | ||
| this.group = "Layouts"; | ||
| this.description = `enables displaying of content in a vertically collapsible fashion.`; | ||
| } | ||
| } | ||
| module.exports = new IgrAccordionComponent(); |
13 changes: 13 additions & 0 deletions
13
.../cli/templates/react/igr-ts/avatar/default/files/src/app/__path__/__filePrefix__.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { beforeAll, expect, test } from 'vitest'; | ||
| import { render } from '@testing-library/react'; | ||
| import $(ClassName) from './$(path)'; | ||
| import { setupTestMocks } from '../../setupTests'; | ||
|
|
||
| beforeAll(() => { | ||
| setupTestMocks(); | ||
| }) | ||
|
|
||
| test('renders $(ClassName) component', () => { | ||
| const wrapper = render(<$(ClassName) />); | ||
| expect(wrapper).toBeTruthy(); | ||
| }); |
16 changes: 16 additions & 0 deletions
16
packages/cli/templates/react/igr-ts/avatar/default/files/src/app/__path__/__filePrefix__.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import style from './style.module.css'; | ||
| import { IgrAvatar } from 'igniteui-react'; | ||
| import 'igniteui-webcomponents/themes/light/bootstrap.css'; | ||
|
|
||
| export default function $(ClassName)() { | ||
| return ( | ||
| <div> | ||
| <h1 className={style.title}>Avatar</h1> | ||
| <div className={style.container}> | ||
| <IgrAvatar shape="circle" size="large" initials="JD" /> | ||
| <IgrAvatar shape="rounded" size="medium" initials="AB" /> | ||
| <IgrAvatar shape="circle" size="small" initials="CD" /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
9 changes: 9 additions & 0 deletions
9
packages/cli/templates/react/igr-ts/avatar/default/files/src/app/__path__/style.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| :local(.container) { | ||
| padding-top: 24px; | ||
| display: flex; | ||
| flex-flow: row; | ||
| justify-content: space-around; | ||
| } | ||
| :local(.title) { | ||
| color: rgb(0, 153, 255); | ||
| } |
16 changes: 16 additions & 0 deletions
16
packages/cli/templates/react/igr-ts/avatar/default/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; | ||
|
|
||
| class IgrAvatarTemplate extends IgniteUIForReactTemplate { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.components = ["Avatar"]; | ||
| this.controlGroup = "Layouts"; | ||
| this.listInComponentTemplates = true; | ||
| this.id = "avatar"; | ||
| this.projectType = "igr-ts"; | ||
| this.name = "Avatar"; | ||
| this.description = "displays an avatar with customizable shape, size, and initials."; | ||
| this.packages = ["igniteui-react@~19.5.2"]; | ||
| } | ||
| } | ||
| module.exports = new IgrAvatarTemplate(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { BaseComponent } from "@igniteui/cli-core"; | ||
|
|
||
| class IgrAvatarComponent extends BaseComponent { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.name = "Avatar"; | ||
| this.group = "Layouts"; | ||
| this.description = `displays an avatar with customizable shape, size, and initials.`; | ||
| } | ||
| } | ||
| module.exports = new IgrAvatarComponent(); |
13 changes: 13 additions & 0 deletions
13
...s/cli/templates/react/igr-ts/badge/default/files/src/app/__path__/__filePrefix__.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { beforeAll, expect, test } from 'vitest'; | ||
| import { render } from '@testing-library/react'; | ||
| import $(ClassName) from './$(path)'; | ||
| import { setupTestMocks } from '../../setupTests'; | ||
|
|
||
| beforeAll(() => { | ||
| setupTestMocks(); | ||
| }) | ||
|
|
||
| test('renders $(ClassName) component', () => { | ||
| const wrapper = render(<$(ClassName) />); | ||
| expect(wrapper).toBeTruthy(); | ||
| }); |
16 changes: 16 additions & 0 deletions
16
packages/cli/templates/react/igr-ts/badge/default/files/src/app/__path__/__filePrefix__.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import style from './style.module.css'; | ||
| import { IgrBadge } from 'igniteui-react'; | ||
| import 'igniteui-webcomponents/themes/light/bootstrap.css'; | ||
|
|
||
| export default function $(ClassName)() { | ||
| return ( | ||
| <div> | ||
| <h1 className={style.title}>Badge</h1> | ||
| <div className={style.container}> | ||
| <IgrBadge outlined={true}>Awaiting test</IgrBadge> | ||
| <IgrBadge outlined={true} variant="danger">Critical issue</IgrBadge> | ||
| <IgrBadge outlined={true} variant="success">Verified</IgrBadge> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
9 changes: 9 additions & 0 deletions
9
packages/cli/templates/react/igr-ts/badge/default/files/src/app/__path__/style.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| :local(.container) { | ||
| padding-top: 24px; | ||
| display: flex; | ||
| flex-flow: row; | ||
| justify-content: space-around; | ||
| } | ||
| :local(.title) { | ||
| color: rgb(0, 153, 255); | ||
| } |
16 changes: 16 additions & 0 deletions
16
packages/cli/templates/react/igr-ts/badge/default/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; | ||
|
|
||
| class IgrBadgeTemplate extends IgniteUIForReactTemplate { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.components = ["Badge"]; | ||
| this.controlGroup = "Data Entry & Display"; | ||
| this.listInComponentTemplates = true; | ||
| this.id = "badge"; | ||
| this.projectType = "igr-ts"; | ||
| this.name = "Badge"; | ||
| this.description = "displays a badge with customizable variants and styles."; | ||
| this.packages = ["igniteui-react@~19.5.2"]; | ||
| } | ||
| } | ||
| module.exports = new IgrBadgeTemplate(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { BaseComponent } from "@igniteui/cli-core"; | ||
|
|
||
| class IgrBadgeComponent extends BaseComponent { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.name = "Badge"; | ||
| this.group = "Data Entry & Display"; | ||
| this.description = `displays a badge with customizable variants and styles.`; | ||
| } | ||
| } | ||
| module.exports = new IgrBadgeComponent(); |
13 changes: 13 additions & 0 deletions
13
.../cli/templates/react/igr-ts/banner/default/files/src/app/__path__/__filePrefix__.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { beforeAll, expect, test } from 'vitest'; | ||
| import { render } from '@testing-library/react'; | ||
| import $(ClassName) from './$(path)'; | ||
| import { setupTestMocks } from '../../setupTests'; | ||
|
|
||
| beforeAll(() => { | ||
| setupTestMocks(); | ||
| }) | ||
|
|
||
| test('renders $(ClassName) component', () => { | ||
| const wrapper = render(<$(ClassName) />); | ||
| expect(wrapper).toBeTruthy(); | ||
| }); |
16 changes: 16 additions & 0 deletions
16
packages/cli/templates/react/igr-ts/banner/default/files/src/app/__path__/__filePrefix__.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import style from './style.module.css'; | ||
| import { IgrBanner } from 'igniteui-react'; | ||
| import 'igniteui-webcomponents/themes/light/bootstrap.css'; | ||
|
|
||
| export default function $(ClassName)() { | ||
| return ( | ||
| <div> | ||
| <h1 className={style.title}>Banner</h1> | ||
| <div className={style.container}> | ||
| <IgrBanner open={true}> | ||
| You are currently not logged in! Please, log into your account first. | ||
| </IgrBanner> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
9 changes: 9 additions & 0 deletions
9
packages/cli/templates/react/igr-ts/banner/default/files/src/app/__path__/style.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| :local(.container) { | ||
| padding-top: 24px; | ||
| display: flex; | ||
| flex-flow: row; | ||
| justify-content: space-around; | ||
| } | ||
| :local(.title) { | ||
| color: rgb(0, 153, 255); | ||
| } |
16 changes: 16 additions & 0 deletions
16
packages/cli/templates/react/igr-ts/banner/default/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; | ||
|
|
||
| class IgrBannerTemplate extends IgniteUIForReactTemplate { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.components = ["Banner"]; | ||
| this.controlGroup = "Notifications"; | ||
| this.listInComponentTemplates = true; | ||
| this.id = "banner"; | ||
| this.projectType = "igr-ts"; | ||
| this.name = "Banner"; | ||
| this.description = "basic IgrBanner"; | ||
| this.packages = ["igniteui-react@~19.5.2"]; | ||
| } | ||
| } | ||
| module.exports = new IgrBannerTemplate(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { BaseComponent } from "@igniteui/cli-core"; | ||
|
|
||
| class IgrBannerComponent extends BaseComponent { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.name = "Banner"; | ||
| this.group = "Notifications"; | ||
| this.description = `displays banner component`; | ||
| } | ||
| } | ||
| module.exports = new IgrBannerComponent(); |
13 changes: 13 additions & 0 deletions
13
...emplates/react/igr-ts/button-group/default/files/src/app/__path__/__filePrefix__.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { beforeAll, expect, test } from 'vitest'; | ||
| import { render } from '@testing-library/react'; | ||
| import $(ClassName) from './$(path)'; | ||
| import { setupTestMocks } from '../../setupTests'; | ||
|
|
||
| beforeAll(() => { | ||
| setupTestMocks(); | ||
| }) | ||
|
|
||
| test('renders $(ClassName) component', () => { | ||
| const wrapper = render(<$(ClassName) />); | ||
| expect(wrapper).toBeTruthy(); | ||
| }); |
18 changes: 18 additions & 0 deletions
18
...cli/templates/react/igr-ts/button-group/default/files/src/app/__path__/__filePrefix__.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import style from './style.module.css'; | ||
| import { IgrButtonGroup, IgrToggleButton } from 'igniteui-react'; | ||
| import 'igniteui-webcomponents/themes/light/bootstrap.css'; | ||
|
|
||
| export default function $(ClassName)() { | ||
| return ( | ||
| <div> | ||
| <h1 className={style.title}>Button Group</h1> | ||
| <div className={style.container}> | ||
| <IgrButtonGroup> | ||
| <IgrToggleButton value="left"><span>Left</span></IgrToggleButton> | ||
| <IgrToggleButton value="center"><span>Center</span></IgrToggleButton> | ||
| <IgrToggleButton value="right"><span>Right</span></IgrToggleButton> | ||
| </IgrButtonGroup> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
9 changes: 9 additions & 0 deletions
9
...s/cli/templates/react/igr-ts/button-group/default/files/src/app/__path__/style.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| :local(.container) { | ||
| padding-top: 24px; | ||
| display: flex; | ||
| flex-flow: row; | ||
| justify-content: space-around; | ||
| } | ||
| :local(.title) { | ||
| color: rgb(0, 153, 255); | ||
| } |
16 changes: 16 additions & 0 deletions
16
packages/cli/templates/react/igr-ts/button-group/default/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { IgniteUIForReactTemplate } from "../../../../../lib/templates/IgniteUIForReactTemplate"; | ||
|
|
||
| class IgrButtonGroupTemplate extends IgniteUIForReactTemplate { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.components = ["Button group"]; | ||
| this.controlGroup = "Data Entry & Display"; | ||
| this.listInComponentTemplates = true; | ||
| this.id = "button-group"; | ||
| this.projectType = "igr-ts"; | ||
| this.name = "Button group"; | ||
| this.description = "basic IgrButtonGroup"; | ||
| this.packages = ["igniteui-react@~19.5.2"]; | ||
| } | ||
| } | ||
| module.exports = new IgrButtonGroupTemplate(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { BaseComponent } from "@igniteui/cli-core"; | ||
|
|
||
| class IgrButtonGroupComponent extends BaseComponent { | ||
| constructor() { | ||
| super(__dirname); | ||
| this.name = "Button group"; | ||
| this.group = "Data Entry & Display"; | ||
| this.description = `displays a group of buttons with toggle functionality.`; | ||
| } | ||
| } | ||
| module.exports = new IgrButtonGroupComponent(); |
13 changes: 13 additions & 0 deletions
13
.../cli/templates/react/igr-ts/button/default/files/src/app/__path__/__filePrefix__.test.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { beforeAll, expect, test } from 'vitest'; | ||
| import { render } from '@testing-library/react'; | ||
| import $(ClassName) from './$(path)'; | ||
| import { setupTestMocks } from '../../setupTests'; | ||
|
|
||
| beforeAll(() => { | ||
| setupTestMocks(); | ||
| }) | ||
|
|
||
| test('renders $(ClassName) component', () => { | ||
| const wrapper = render(<$(ClassName) />); | ||
| expect(wrapper).toBeTruthy(); | ||
| }); |
14 changes: 14 additions & 0 deletions
14
packages/cli/templates/react/igr-ts/button/default/files/src/app/__path__/__filePrefix__.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import style from './style.module.css'; | ||
| import { IgrButton } from 'igniteui-react'; | ||
| import 'igniteui-webcomponents/themes/light/bootstrap.css'; | ||
|
|
||
| export default function $(ClassName)() { | ||
| return ( | ||
| <div> | ||
| <h1 className={style.title}>Button</h1> | ||
| <div className={style.container}> | ||
| <IgrButton size="large"><span>Large button</span></IgrButton> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.