Introduce React-Trello in place of React-Kanban

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-05-09 13:22:58 -04:00
parent f77a16648f
commit f647e1ff11
49 changed files with 2632 additions and 119 deletions

View File

@@ -0,0 +1,38 @@
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 deprecationWarnings from "./helpers/deprecationWarnings";
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 }) => {
deprecationWarnings(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;