Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions samples/inputs/rating/basic/src/index.css

This file was deleted.

16 changes: 0 additions & 16 deletions samples/inputs/rating/basic/src/index.tsx

This file was deleted.

5 changes: 0 additions & 5 deletions samples/inputs/rating/custom/src/index.css

This file was deleted.

43 changes: 0 additions & 43 deletions samples/inputs/rating/custom/src/index.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions samples/inputs/rating/empty/src/index.css

This file was deleted.

43 changes: 0 additions & 43 deletions samples/inputs/rating/empty/src/index.tsx

This file was deleted.

50 changes: 50 additions & 0 deletions samples/inputs/rating/interaction-states/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
This folder contains implementation of React application with example of Interaction States feature using [Rating](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.


<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
<a target="_blank" href="https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem" alt="View Docs" src="https://dl.infragistics.com/x/img/browsers/button-docs.png"/>
</a>
<a target="_blank" href="./src/index.tsx" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="View Code" src="https://dl.infragistics.com/x/img/browsers/button-code.png"/>
</a>
<a target="_blank" href="https://www.infragistics.com/react-demos/samples/inputs/rating/interaction-states" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="Run Sample" src="https://dl.infragistics.com/x/img/browsers/button-run.png"/>
</a>
</body>
</html>

## Branches

> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-react-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-react-examples/tree/vnext) branch only when you want to contribute new samples to this repository.

## Instructions

Follow these instructions to run this example:


```
git clone https://github.com/IgniteUI/igniteui-react-examples.git
cd ./igniteui-react-examples
git checkout master
cd ./samples/inputs/rating/interaction-states
```

open above folder in VS Code or type:
```
code .
```

In terminal window, run:
```
npm install
npm start
```

Then open http://localhost:4200/ in your browser


## Learn More

To learn more about **Ignite UI for React** components, check out the [React documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html).
11 changes: 11 additions & 0 deletions samples/inputs/rating/interaction-states/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>RatingInteractionStates</title>
<link href="https://dl.infragistics.com/x/css/samples/shared.v8.css" rel="stylesheet" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
42 changes: 42 additions & 0 deletions samples/inputs/rating/interaction-states/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "react-rating-interaction-states",
"description": "This project provides example of Rating Interaction States using Infragistics React components",
"author": "Infragistics",
"homepage": ".",
"version": "1.4.0",
"private": true,
"scripts": {
"start": "vite --port 4200",
"build": "tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build",
"preview": "vite preview",
"test": "vitest"
},
"dependencies": {
"igniteui-dockmanager": "^2.2.1",
"igniteui-react": "19.9.0",
"igniteui-react-core": "19.6.0",
"igniteui-webcomponents": "~7.4.1",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"tslib": "^2.4.0"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"@types/node": "^24.7.1",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@vitejs/plugin-react": "^6.1.1",
"@vitest/browser": "^5.0.2",
"typescript": "^5.9.3",
"vite": "^8.3.1",
"vitest": "^5.0.2",
"vitest-canvas-mock": "^1.2.0",
"worker-loader": "^3.0.8"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
33 changes: 33 additions & 0 deletions samples/inputs/rating/interaction-states/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* shared styles are loaded from: */
/* https://dl.infragistics.com/x/css/samples/shared.v8.css */

.sample {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
padding: 1rem;
}

.states {
display: flex;
align-items: center;
gap: 3.75rem;
}

.state {
display: flex;
align-items: center;
gap: 1.875rem;
}

.state-label {
font: 400 14px / 24px "Aktiv Grotesk", sans-serif;
letter-spacing: 0.1px;
color: var(--ig-gray-600);
}

igc-rating {
--ig-rating-label-color: var(--ig-gray-700);
--ig-rating-disabled-label-color: var(--ig-gray-500);
}
25 changes: 25 additions & 0 deletions samples/inputs/rating/interaction-states/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import ReactDOM from 'react-dom/client';
import './index.css';
import { IgrRating } from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';

export default function RatingInteractionStates() {
return (
<div className="sample">
<div className="states">
<div className="state">
<span className="state-label">Enabled</span>
<IgrRating label="Rate your experience" value={1} />
</div>
<div className="state">
<span className="state-label">Disabled</span>
<IgrRating label="Rate your experience" value={1} disabled={true} />
</div>
</div>
</div>
);
}

// rendering above component to the React DOM
const root = ReactDOM.createRoot(document.getElementById('root')!);
root.render(<RatingInteractionStates/>);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This folder contains implementation of React application with example of Custom feature using [Rating](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.
This folder contains implementation of React application with example of Layout feature using [Rating](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component.


<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
Expand All @@ -9,7 +9,7 @@ This folder contains implementation of React application with example of Custom
<a target="_blank" href="./src/index.tsx" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="View Code" src="https://dl.infragistics.com/x/img/browsers/button-code.png"/>
</a>
<a target="_blank" href="https://www.infragistics.com/react-demos/samples/inputs/rating/custom" rel="noopener noreferrer">
<a target="_blank" href="https://www.infragistics.com/react-demos/samples/inputs/rating/layout" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="Run Sample" src="https://dl.infragistics.com/x/img/browsers/button-run.png"/>
</a>
</body>
Expand All @@ -28,7 +28,7 @@ Follow these instructions to run this example:
git clone https://github.com/IgniteUI/igniteui-react-examples.git
cd ./igniteui-react-examples
git checkout master
cd ./samples/inputs/rating/custom
cd ./samples/inputs/rating/layout
```

open above folder in VS Code or type:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Rating Overview</title>
<title>RatingLayout</title>
<link href="https://dl.infragistics.com/x/css/samples/shared.v8.css" rel="stylesheet" />
</head>
<body>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-button-overview",
"description": "This project provides example of Button Overview using Infragistics React components",
"name": "react-rating-layout",
"description": "This project provides example of Rating Layout using Infragistics React components",
"author": "Infragistics",
"homepage": ".",
"version": "1.4.0",
Expand Down
32 changes: 32 additions & 0 deletions samples/inputs/rating/layout/src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/* shared styles are loaded from: */
/* https://dl.infragistics.com/x/css/samples/shared.v8.css */

.sample {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
padding: 1rem;
}

.layouts {
display: flex;
align-items: center;
gap: 3.75rem;
}

.layout {
display: flex;
align-items: center;
gap: 1.875rem;
}

.layout-label {
font: 500 14px / 24px "Aktiv Grotesk", sans-serif;
letter-spacing: 0.1px;
color: var(--ig-gray-600);
}

igc-rating {
--ig-rating-label-color: var(--ig-gray-700);
}
25 changes: 25 additions & 0 deletions samples/inputs/rating/layout/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import ReactDOM from 'react-dom/client';
import './index.css';
import { IgrRating } from 'igniteui-react';
import 'igniteui-webcomponents/themes/light/bootstrap.css';

export default function RatingLayout() {
return (
<div className="sample">
<div className="layouts">
<div className="layout">
<span className="layout-label">Label / On</span>
<IgrRating label="Rate your experience" value={3} />
</div>
<div className="layout">
<span className="layout-label">Label / Off</span>
<IgrRating aria-label="Rate your experience" value={3} />
</div>
</div>
</div>
);
}

// rendering above component to the React DOM
const root = ReactDOM.createRoot(document.getElementById('root')!);
root.render(<RatingLayout/>);
Loading
Loading