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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,6 @@
"checkbox",
"dropdown",
"dropdown-button",
null
"virtualize"
]
}
21 changes: 18 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@
<link href="https://fonts.googleapis.com/css2?family=Open+Sans&display=swap" rel="stylesheet"></link>
<link rel="shortcut icon" href="favicon.ico" />
<style id="themelink"></style>
<link rel="stylesheet" href="./src/common/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="./src/common/codemirror/theme/mbo.css">
<link rel="stylesheet" type="text/css" href="./styles/index.css" />
<link rel="stylesheet" type="text/css" href="./src/common/lib/highlightjs/styles/default.css" />
<link href="src/common/lib/content/codemirror.css" rel="stylesheet"></link>
<script src="./src/common/codemirror/lib/codemirror.js"></script>
<script src="./src/common/codemirror/mode/javascript/javascript.js"></script>
<script src="./src/common/codemirror/mode/jsx/jsx.js"></script>
<script src="./src/common/codemirror/mode/xml/xml.js"></script>
<script src="./src/common/codemirror/mode/css/css.js"></script>
<script>
var orgin = location.origin;
var baseref = location.href.split('#')[0].replace(orgin, '');
Expand Down Expand Up @@ -199,14 +204,22 @@
<span class='sb-icons sb-theme-select sb-icon-icon-selection'></span>
<span class="switch-text">Tailwind CSS Dark</span>
</li>
<li class='active' id="material">
<li class='e-list' id="material">
<span class='sb-icons sb-theme-select sb-icon-icon-selection'></span>
<span class="switch-text">Material</span>
</li>
<li class="e-list" id="material-dark">
<span class='sb-icons sb-theme-select sb-icon-icon-selection'></span>
<span class="switch-text">Material Dark</span>
</li>
<li class='active' id="material3">
<span class='sb-icons sb-theme-select sb-icon-icon-selection'></span>
<span class="switch-text">Material 3</span>
</li>
<li class="e-list" id="material3-dark">
<span class='sb-icons sb-theme-select sb-icon-icon-selection'></span>
<span class="switch-text">Material 3 Dark</span>
</li>
<li id="fabric">
<span class='sb-icons sb-theme-select sb-icon-icon-selection'></span>
<span class="switch-text">Fabric</span>
Expand Down Expand Up @@ -255,6 +268,8 @@
<option value="tailwind-dark">Tailwind CSS Dark</option>
<option value="material">Material</option>
<option value="material-dark">Material Dark</option>
<option value="material3">Material 3</option>
<option value="material3-dark">Material 3 Dark</option>
<option value="fabric">Fabric</option>
<option value="fabric-dark">Fabric Dark</option>
<option value="bootstrap4">Bootstrap v4</option>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syncfusion/ej2-react-samples",
"version": "21.1.35",
"version": "22.1.34",
"description": "Examples of React UI Components",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
Expand Down Expand Up @@ -60,7 +60,7 @@
"@types/marked": "^0.3.0",
"@types/codemirror": "0.0.56",
"marked": "^0.3.19",
"codemirror": "^5.37.0",
"codemirror": "^5.65.12",
"tributejs": "^3.7.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/config.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const AccordionSampleOrder: Object = [
{ 'path': 'accordion/default', 'component': 'Default', 'name': 'Default Functionalities', 'description': 'The sample demonstrates that default functionalities of the Accordion component which works by expand and collapse action in React platform.', 'order': '01', 'category': 'Accordion', 'api': '{ "AccordionComponent": ["items"] }' },
{ 'path': 'accordion/ajax', 'component': 'AjaxContent', 'name': 'Ajax Content', 'description': 'The sample demonstrates how to load the content to the Accordion component from external sources using Ajax library in React platform.', 'order': '01', 'category': 'Accordion', 'api': '{ "AccordionComponent": ["expandMode", "expanding"] }' },
{ 'path': 'accordion/templates', 'component': 'Templates', 'name': 'Templates', 'description': 'This sample demonstrates the template functionalities of the Accordion with an example of loading an Accordion content using content property in React platform.', 'order': '01', 'category': 'Accordion', 'api': '{ "AccordionComponent": ["expandMode", "expanding"] }' },
{ 'path': 'accordion/icon', 'component': 'Icons', 'name': 'Icons', 'description': 'The sample demonstrates how to represent pane headers with an icon in Accordion component which populates from items collection in React platform.', 'order': '01', 'category': 'Accordion' },
{ 'path': 'accordion/keyboard-interaction', 'component': 'KeyboardInteraction', 'name': 'Keyboard Interaction', 'description': 'The sample showcases the keyboard shortcuts applicable on Accordion component with details in React platform.', 'order': '01', 'category': 'Accordion', 'api': '{ "AccordionComponent": ["items"] }' }
]
49 changes: 19 additions & 30 deletions src/accordion/default-functional.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,42 @@
import * as ReactDOM from 'react-dom';
import * as React from 'react';
import { useEffect } from 'react';
import { AccordionComponent, AccordionItemDirective, AccordionItemsDirective } from '@syncfusion/ej2-react-navigations';
import { updateSampleSection } from '../common/sample-base';

function Default() {
React.useEffect(() => {
const Default = () => {
useEffect(() => {
updateSampleSection();
}, [])

function acrdnheader1() {
const acrdnheader1 = () => {
return (
<div>
ASP.NET
</div>
<div>ASP.NET</div>
);
}
function acrdnheader2() {
const acrdnheader2 = () => {
return (
<div>
ASP.NET MVC
</div>
<div>ASP.NET MVC</div>
);
}
function acrdnheader3() {
const acrdnheader3 = () => {
return (
<div>
JavaScript
</div>
<div>JavaScript</div>
);
}
function acrdnContent1() {
const acrdnContent1 = () => {
return (
<div>
Microsoft ASP.NET is a set of technologies in the Microsoft .NET Framework for building Web applications and XML Web services. ASP.NET pages execute on the server and generate markup such as HTML, WML, or XML that is sent to a desktop or mobile browser. ASP.NET pages use a compiled,event-driven programming model that improves performance and enables the separation of application logic and user interface.
</div>
<div>Microsoft ASP.NET is a set of technologies in the Microsoft .NET Framework for building Web applications and XML Web services. ASP.NET pages execute on the server and generate markup such as HTML, WML, or XML that is sent to a desktop or mobile browser. ASP.NET pages use a compiled,event-driven programming model that improves performance and enables the separation of application logic and user interface.</div>
);
}
function acrdnContent2() {
const acrdnContent2 = () => {
return (
<div>
The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications.The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication.
</div>
<div>The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications.The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication.</div>
);
}
function acrdnContent3() {
const acrdnContent3 = () => {
return (
<div>
JavaScript (JS) is an interpreted computer programming language.It was originally implemented as part of web browsers so that client-side scripts could interact with the user, control the browser, communicate asynchronously, and alter the document content that was displayed.More recently, however, it has become common in both game development and the creation of desktop applications.
</div>
<div>JavaScript (JS) is an interpreted computer programming language.It was originally implemented as part of web browsers so that client-side scripts could interact with the user, control the browser, communicate asynchronously, and alter the document content that was displayed.More recently, however, it has become common in both game development and the creation of desktop applications.</div>
);
}
return (
Expand All @@ -62,7 +51,8 @@ function Default() {
<AccordionItemDirective header={acrdnheader3} content={acrdnContent3} />
</AccordionItemsDirective>
</AccordionComponent>
</div></div>
</div>
</div>
<div id="action-description">
<p>
This sample demonstrates the default functionalities of the <code>Accordion</code>. Click on the <code>header</code> element to expand/collapse the corresponding Accordion panel, and displays its content.
Expand All @@ -75,12 +65,11 @@ function Default() {
</p>
<p>
More information about Accordion can be found in this <a target="_blank"
href="https://ej2.syncfusion.com/react/documentation/accordion/getting-started/">
documentation</a> section.
href="https://ej2.syncfusion.com/react/documentation/accordion/getting-started/">
documentation</a> section.
</p>
</div>
</div>

);
}
export default Default;
123 changes: 62 additions & 61 deletions src/accordion/icon-functional.tsx
Original file line number Diff line number Diff line change
@@ -1,112 +1,113 @@
import * as ReactDOM from 'react-dom';
import * as React from 'react';
import { useEffect } from 'react';
import { AccordionComponent, AccordionItemDirective, AccordionItemsDirective } from '@syncfusion/ej2-react-navigations';
import { updateSampleSection } from '../common/sample-base';
import './accordion.component.css'

function Icons() {
React.useEffect(() => {
const Icons = () => {
useEffect(() => {
updateSampleSection();
}, [])

function acrdnHeader1() {
const acrdnHeader1 = () => {
return (
<div>Athletics</div>
)
}
function acrdnHeader2() {
const acrdnHeader2 = () => {
return (
<div>Water Games</div>
)
}
function acrdnHeader3() {
const acrdnHeader3 = () => {
return (
<div>Racing</div>
)
}
function acrdnHeader4() {
const acrdnHeader4 = () => {
return (
<div>Indoor Games</div>
)
}
function athletics() {
const athletics = () => {
return(
<div id="athletics">
<li><span className='e-acrdn-icons e-content-icon marathon'></span>Marathon</li>
<li><span className='e-acrdn-icons e-content-icon javelin'></span>Javelin Throw</li>
<li><span className='e-acrdn-icons e-content-icon discus'></span>Discus Throw</li>
<li><span className='e-acrdn-icons e-content-icon highjump'></span>High Jump</li>
<li><span className='e-acrdn-icons e-content-icon longjump'></span>Long Jump</li>
<li><span className='e-acrdn-icons e-content-icon marathon'></span>Marathon</li>
<li><span className='e-acrdn-icons e-content-icon javelin'></span>Javelin Throw</li>
<li><span className='e-acrdn-icons e-content-icon discus'></span>Discus Throw</li>
<li><span className='e-acrdn-icons e-content-icon highjump'></span>High Jump</li>
<li><span className='e-acrdn-icons e-content-icon longjump'></span>Long Jump</li>
</div>
);
);
}
function water_games() {
const water_games = () => {
return(
<div id="water_games">
<li><span className='e-acrdn-icons e-content-icon dive'></span>Diving</li>
<li><span className='e-acrdn-icons e-content-icon swimming'></span>Swimming</li>
<li><span className='e-acrdn-icons e-content-icon marathan_swim'></span>Marathon Swimming</li>
<li><span className='e-acrdn-icons e-content-icon sync_swim'></span>Synchronized Swimming</li>
<li><span className='e-acrdn-icons e-content-icon waterpolo'></span>Water Polo</li>
</div>
);
<li><span className='e-acrdn-icons e-content-icon dive'></span>Diving</li>
<li><span className='e-acrdn-icons e-content-icon swimming'></span>Swimming</li>
<li><span className='e-acrdn-icons e-content-icon marathan_swim'></span>Marathon Swimming</li>
<li><span className='e-acrdn-icons e-content-icon sync_swim'></span>Synchronized Swimming</li>
<li><span className='e-acrdn-icons e-content-icon waterpolo'></span>Water Polo</li>
</div>
);
}
function racing_games() {
const racing_games = () => {
return(
<div id="racing_games">
<li><span className='e-acrdn-icons e-content-icon cycle_BMX'></span>Cycling BMX</li>
<li><span className='e-acrdn-icons e-content-icon cycle_Mountain'></span>Cycling Mountain Bike</li>
<li><span className='e-acrdn-icons e-content-icon cycle'></span>Cycle Racing</li>
<li><span className='e-acrdn-icons e-content-icon sailing'></span>Sailing</li>
<li><span className='e-acrdn-icons e-content-icon rowing'></span>Rowing</li>
</div>
);
<li><span className='e-acrdn-icons e-content-icon cycle_BMX'></span>Cycling BMX</li>
<li><span className='e-acrdn-icons e-content-icon cycle_Mountain'></span>Cycling Mountain Bike</li>
<li><span className='e-acrdn-icons e-content-icon cycle'></span>Cycle Racing</li>
<li><span className='e-acrdn-icons e-content-icon sailing'></span>Sailing</li>
<li><span className='e-acrdn-icons e-content-icon rowing'></span>Rowing</li>
</div>
);
}

function indoor_games() {
return(
<div id="indoor_games">
<li><span className='e-acrdn-icons e-content-icon tennis'></span>Table Tennis</li>
<li><span className='e-acrdn-icons e-content-icon badminton'></span>Badminton</li>
<li><span className='e-acrdn-icons e-content-icon volleyball'></span>Volleyball</li>
<li><span className='e-acrdn-icons e-content-icon boxing'></span>Boxing</li>
<li><span className='e-acrdn-icons e-content-icon swimming_In'></span>Swimming</li>
</div>
);
}
const indoor_games = () => {
return(
<div id="indoor_games">
<li><span className='e-acrdn-icons e-content-icon tennis'></span>Table Tennis</li>
<li><span className='e-acrdn-icons e-content-icon badminton'></span>Badminton</li>
<li><span className='e-acrdn-icons e-content-icon volleyball'></span>Volleyball</li>
<li><span className='e-acrdn-icons e-content-icon boxing'></span>Boxing</li>
<li><span className='e-acrdn-icons e-content-icon swimming_In'></span>Swimming</li>
</div>
);
}
return (
<div className='control-pane'>
<div className='control-section accordion-control-section'>
<div className= 'control Accordion-sample' style = {{margin: '25px 0' }}>
{/* Render the Accoridon Component */}
<AccordionComponent>
<AccordionItemsDirective>
{/* Render the Accoridon Component */}
<AccordionComponent>
<AccordionItemsDirective>
<AccordionItemDirective header= {acrdnHeader1} iconCss='e-athletics e-acrdn-icons' content={ athletics } expanded={true} />
<AccordionItemDirective header= {acrdnHeader2} iconCss='e-water-game e-acrdn-icons' content={ water_games } />
<AccordionItemDirective header= {acrdnHeader3} iconCss='e-racing-games e-acrdn-icons'content={ racing_games } />
<AccordionItemDirective header= {acrdnHeader4} iconCss='e-indoor-games e-acrdn-icons' content={ indoor_games } />
</AccordionItemsDirective>
</AccordionComponent>
</div></div>
</AccordionItemsDirective>
</AccordionComponent>
</div>
</div>
<div id="action-description">
<p>
This sample demonstrates the icon representation of the <code>Accordion</code>. Click on the header element to expand/collapse the corresponding Accordion panel, and displays its content.
</p>
</div>
<p>
This sample demonstrates the icon representation of the <code>Accordion</code>. Click on the header element to expand/collapse the corresponding Accordion panel, and displays its content.
</p>
</div>
<div id='description'>
<p>
<p>
This Accordion is populated with icons which renders by mapping the <code>iconCss</code> field. This sample illustrates
the some of the games list.
</p>
<p>
More information about Accordion can be found in this <a target="_blank" href="https://ej2.syncfusion.com/react/documentation/accordion/getting-started/">
documentation</a> section.
</p>
</p>
<p>
<p>
This Accordion is populated with icons which renders by mapping the <code>iconCss</code> field. This sample illustrates
the some of the games list.
</p>
<p>
More information about Accordion can be found in this <a target="_blank" href="https://ej2.syncfusion.com/react/documentation/accordion/getting-started/">
documentation</a> section.
</p>
</p>
</div>
</div>

);
}
export default Icons;
Loading