36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
import React from "react";
|
|
|
|
import Draggable from "./dnd/Draggable.jsx";
|
|
import Container from "./dnd/Container.jsx";
|
|
import BoardContainer from "./controllers/BoardContainer.jsx";
|
|
import Board from "./controllers/Board.jsx";
|
|
import Lane from "./controllers/Lane.jsx";
|
|
import DefaultComponents from "./components";
|
|
|
|
import widgets from "./widgets/index";
|
|
|
|
import { StyleSheetManager } from "styled-components";
|
|
import isPropValid from "@emotion/is-prop-valid";
|
|
|
|
export { Draggable, Container, BoardContainer, Lane, widgets };
|
|
|
|
export { DefaultComponents as components };
|
|
|
|
// Enhanced default export using arrow function for simplicity
|
|
const TrelloBoard = ({ components, ...otherProps }) => {
|
|
return (
|
|
<StyleSheetManager shouldForwardProp={shouldForwardProp}>
|
|
<Board components={{ ...DefaultComponents, ...components }} {...otherProps} />
|
|
</StyleSheetManager>
|
|
);
|
|
};
|
|
|
|
const shouldForwardProp = (propName, target) => {
|
|
if (typeof target === "string") {
|
|
return isPropValid(propName);
|
|
}
|
|
return true;
|
|
};
|
|
|
|
export default TrelloBoard;
|