@@ -3,15 +3,22 @@ import classNames from "classnames";
|
||||
import { useState } from "react";
|
||||
import { v1 } from "uuid";
|
||||
|
||||
const Board = ({ id, className, components, ...additionalProps }) => {
|
||||
const Board = ({ id, className, components, orientation, ...additionalProps }) => {
|
||||
const [storeId] = useState(id || v1());
|
||||
|
||||
const allClassNames = classNames("react-trello-board", className || "");
|
||||
|
||||
const Styles = orientation === "horizontal" ? components.GlobalStyleHorizontal : components.GlobalStyleVertical;
|
||||
return (
|
||||
<>
|
||||
<components.GlobalStyle />
|
||||
<BoardContainer components={components} {...additionalProps} id={storeId} className={allClassNames} />
|
||||
<Styles />
|
||||
<BoardContainer
|
||||
components={components}
|
||||
orientation={orientation}
|
||||
{...additionalProps}
|
||||
id={storeId}
|
||||
className={allClassNames}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user