Skip to content

Commit

Permalink
release v2.0.3 - locale and locale example updates
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Nov 6, 2023
1 parent 37e4247 commit 1addbdd
Show file tree
Hide file tree
Showing 96 changed files with 16,546 additions and 1,076 deletions.
24 changes: 21 additions & 3 deletions apps/material-react-table-docs/example-groups/LocaleExamples.tsx
@@ -1,17 +1,24 @@
import { useState } from 'react';
import { Box, Tab, Tabs } from '@mui/material';
import AM_Table from '../examples/localization-i18n-am';
import AR_Table from "../examples/localization-i18n-ar";
import AZ_Table from '../examples/localization-i18n-az';
import BG_Table from '../examples/localization-i18n-bg';
import CS_Table from '../examples/localization-i18n-cs';
import DA_Table from '../examples/localization-i18n-da';
import DE_Table from '../examples/localization-i18n-de';
import EN_Table from '../examples/localization-i18n-en';
import ES_Table from '../examples/localization-i18n-es';
import ET_Table from '../examples/localization-i18n-et';
import FA_Table from '../examples/localization-i18n-fa';
import FI_Table from '../examples/localization-i18n-fi';
import FR_Table from '../examples/localization-i18n-fr';
import HU_Table from '../examples/localization-i18n-hu';
import HY_Table from '../examples/localization-i18n-hy';
import ID_Table from '../examples/localization-i18n-id';
import IT_Table from '../examples/localization-i18n-it';
import JA_Table from '../examples/localization-i18n-ja';
import KO_Table from '../examples/localization-i18n-ko';
import NL_Table from '../examples/localization-i18n-nl';
import NO_Table from '../examples/localization-i18n-no';
import NP_Table from '../examples/localization-i18n-np';
Expand All @@ -29,22 +36,27 @@ import UK_Table from '../examples/localization-i18n-uk';
import VI_Table from '../examples/localization-i18n-vi';
import ZH_HANS_Table from '../examples/localization-i18n-zh-hans';
import ZH_HANT_Table from '../examples/localization-i18n-zh-hant';
import AR_Table from "../examples/localization-i18n-ar";

const supportedLocales = [
'am',
'ar',
'az',
'bg',
'cs',
'da',
'de',
'en',
'ar',
'es',
'et',
'fa',
'fi',
'fr',
'hu',
'hy',
'id',
'it',
'ja',
'ko',
'nl',
'no',
'np',
Expand Down Expand Up @@ -88,19 +100,25 @@ const LocaleExamples = () => {
))}
</Tabs>
</Box>
{currentLocale === 'am' && <AM_Table />}
{currentLocale === 'ar' && <AR_Table />}
{currentLocale === 'az' && <AZ_Table />}
{currentLocale === 'bg' && <BG_Table />}
{currentLocale === 'cs' && <CS_Table />}
{currentLocale === 'da' && <DA_Table />}
{currentLocale === 'de' && <DE_Table />}
{currentLocale === 'en' && <EN_Table />}
{currentLocale === 'ar' && <AR_Table />}
{currentLocale === 'es' && <ES_Table />}
{currentLocale === 'et' && <ET_Table />}
{currentLocale === 'fa' && <FA_Table />}
{currentLocale === 'fi' && <FI_Table />}
{currentLocale === 'fr' && <FR_Table />}
{currentLocale === 'hu' && <HU_Table />}
{currentLocale === 'hy' && <HY_Table />}
{currentLocale === 'id' && <ID_Table />}
{currentLocale === 'it' && <IT_Table />}
{currentLocale === 'ja' && <JA_Table />}
{currentLocale === 'ko' && <KO_Table />}
{currentLocale === 'nl' && <NL_Table />}
{currentLocale === 'no' && <NO_Table />}
{currentLocale === 'np' && <NP_Table />}
Expand Down
@@ -0,0 +1,17 @@
import { SourceCodeSnippet } from '../../components/mdx/SourceCodeSnippet';
import Example from './sandbox/src/TS';
const JS = require('!!raw-loader!./sandbox/src/JS.js').default;
const TS = require('!!raw-loader!./sandbox/src/TS.tsx').default;

const ExampleTable = () => {
return (
<SourceCodeSnippet
Component={Example}
javaScriptCode={JS}
typeScriptCode={TS}
tableId="localization-i18n-am"
/>
);
};

export default ExampleTable;
@@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
@@ -0,0 +1,6 @@
# Example

To run this example:

- `npm install` or `yarn`
- `npm run start` or `yarn start`
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Material React Table Example</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

2 comments on commit 1addbdd

@vercel
Copy link

@vercel vercel bot commented on 1addbdd Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 1addbdd Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.