UNPKG

@carbon/react

Version:

React components for the Carbon Design System

31 lines (29 loc) 817 B
/** * 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. */ import { PrefixContext } from "../../internal/usePrefix.js"; import "react"; import PropTypes from "prop-types"; import { jsx } from "react/jsx-runtime"; //#region src/components/ClassPrefix/index.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 ClassPrefix({ children, prefix }) { return /* @__PURE__ */ jsx(PrefixContext.Provider, { value: prefix, children }); } ClassPrefix.propTypes = { children: PropTypes.node, prefix: PropTypes.string.isRequired }; //#endregion export { ClassPrefix };