import { useState, useMemo } from 'react'; import { getData } from '../data'; import { Gantt, ContextMenu, Toolbar, Editor } from '../../src/'; import { Segmented, Locale } from '@svar-ui/react-core'; import { cn } from '@svar-ui/gantt-locales'; import { cn as cnCore } from '@svar-ui/core-locales'; import './GanttLocale.css'; function GanttLocale({ skinSettings }) { const langs = [ { id: 'en', label: 'EN' }, { id: 'cn', label: 'CN' }, ]; const [lang, setLang] = useState('en'); return (
setLang(value)} />
{lang === 'en' && ( )} {lang === 'cn' && ( )}
); } function GanttWidget(props) { const { skinSettings } = props; const [api, setApi] = useState(null); const data = useMemo(() => getData(), []); return ( <>
{api && }
); } export default GanttLocale;