@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com's products.
20 lines (19 loc) • 561 B
JavaScript
"use client";
import * as React from "react";
import cx from "clsx";
const LayoutColumn = ({
as: Component = "div",
children,
dataTest,
spanEntireRow
}) => {
return (
/*#__PURE__*/
// @ts-expect-error allow any component passed as string (TODO change the prop type to React.ElementType to fix this error)
React.createElement(Component, {
className: cx("max-lm:[&_.orbit-card]:-mx-400 max-lm:[&_.orbit-card]:w-auto", spanEntireRow && "col-span-full"),
"data-test": dataTest
}, children)
);
};
export default LayoutColumn;