Toggle Orientation now works dynamically
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -7,11 +7,11 @@ const Board = ({ id, className, components, orientation, ...additionalProps }) =
|
|||||||
const [storeId] = useState(id || v1());
|
const [storeId] = useState(id || v1());
|
||||||
|
|
||||||
const allClassNames = classNames("react-trello-board", className || "");
|
const allClassNames = classNames("react-trello-board", className || "");
|
||||||
const Styles = orientation === "horizontal" ? components.GlobalStyleHorizontal : components.GlobalStyleVertical;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Styles />
|
{orientation === "horizontal" && <components.GlobalStyleHorizontal />}
|
||||||
|
{orientation === "vertical" && <components.GlobalStyleVertical />}
|
||||||
<BoardContainer
|
<BoardContainer
|
||||||
components={components}
|
components={components}
|
||||||
orientation={orientation}
|
orientation={orientation}
|
||||||
|
|||||||
Reference in New Issue
Block a user