UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

26 lines (22 loc) 869 B
"use client"; const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs'); const require_hooks_use_mounted_index = require('../../hooks/use-mounted/index.cjs'); const require_show = require('../show/show.cjs'); let react_jsx_runtime = require("react/jsx-runtime"); react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime); //#region src/components/client-only/client-only.tsx /** * `ClientOnly` is a component that renders its children only on the client side. * * @see https://yamada-ui.com/docs/components/client-only */ const ClientOnly = ({ children, fallback }) => { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_show.Show, { fallback, when: require_hooks_use_mounted_index.useMounted({ state: true }), children }); }; //#endregion exports.ClientOnly = ClientOnly; //# sourceMappingURL=client-only.cjs.map