@carbon/react
Version:
React components for the Carbon Design System
31 lines (29 loc) • 800 B
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.
*/
import { IdPrefixContext } from "../../internal/useIdPrefix.js";
import "react";
import PropTypes from "prop-types";
import { jsx } from "react/jsx-runtime";
//#region src/components/IdPrefix/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 IdPrefix({ children, prefix }) {
return /* @__PURE__ */ jsx(IdPrefixContext.Provider, {
value: prefix,
children
});
}
IdPrefix.propTypes = {
children: PropTypes.node,
prefix: PropTypes.string
};
//#endregion
export { IdPrefix };