app.tsx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React from 'react';
import { Routes, Route } from 'react-router-dom';
import { Accordion } from '@learnbit-react/web-mobile-design-system.base-ui.react.accordion';
export function AccordionApp() {
  return (
    <>
      {/* header component */}
      <Routes>
        <Route
          path="/"
          element={
            <Accordion
              elementList={[
                { id: '01', title: 'Asia' },
                { id: '02', title: 'Africa' },
                { id: '03', title: 'North America' },
                { id: '04', title: 'South America' },
                { id: '05', title: 'Antarctica' },
                { id: '06', title: 'Australia / Oceania' },
                { id: '07', title: 'Europe' },
              ]}
            />
          }
        />
        <Route path="/about">{/* about page component */}</Route>
      </Routes>
      {/* footer component */}
    </>
  );
}
CopiedCopy