-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.tsx
42 lines (33 loc) · 1.05 KB
/
index.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
31
32
33
34
35
36
37
38
39
40
41
42
import React from "react";
import * as DefaultComponents from "./components";
import {
BoardContainer,
BoardContainerProps,
} from "./controllers/BoardContainer";
import { Lane } from "./controllers/Lane";
import Container from "./dnd/Container";
import { Draggable } from "./dnd/Draggable";
import deprecationWarnings from "./helpers/deprecationWarnings";
import locales from "./locales";
export * from "./widgets";
import { Board } from "./controllers/Board";
import createTranslate from "./helpers/createTranslate";
export { Draggable, Container, BoardContainer, Lane, createTranslate, locales };
export { DefaultComponents as components };
const DEFAULT_LANG = "en";
function DefaultBoard({
components,
lang = DEFAULT_LANG,
...otherProps
}: BoardContainerProps & { lang?: keyof typeof locales }) {
deprecationWarnings(otherProps);
const translate = createTranslate(locales[lang || "en"].translation);
return (
<Board
t={translate}
components={{ ...DefaultComponents, ...components }}
{...otherProps}
/>
);
}
export default DefaultBoard;