@carbon/react
Version:
React components for the Carbon Design System
44 lines (42 loc) • 1.58 kB
JavaScript
/**
* Copyright IBM Corp. 2016, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_index = require("../FeatureFlags/index.js");
const require_FlexGrid = require("./FlexGrid.js");
const require_CSSGrid = require("./CSSGrid.js");
let react = require("react");
react = require_runtime.__toESM(react);
let prop_types = require("prop-types");
prop_types = require_runtime.__toESM(prop_types);
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/Grid/Grid.tsx
/**
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
function Grid(props) {
if (require_index.useFeatureFlag("enable-css-grid")) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_CSSGrid.CSSGridComponent, { ...props });
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FlexGrid.FlexGridComponent, { ...props });
}
Grid.propTypes = {
align: prop_types.default.oneOf([
"start",
"center",
"end"
]),
as: prop_types.default.oneOfType([prop_types.default.string, prop_types.default.elementType]),
children: prop_types.default.node,
className: prop_types.default.string,
condensed: prop_types.default.bool,
fullWidth: prop_types.default.bool,
narrow: prop_types.default.bool
};
const GridAsGridComponent = Grid;
//#endregion
exports.GridAsGridComponent = GridAsGridComponent;