UNPKG

@yamada-ui/react

Version:

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

37 lines (33 loc) 1.59 kB
"use client"; const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs'); const require_factory = require('../../core/system/factory.cjs'); const require_create_component = require('../../core/components/create-component.cjs'); const require_status_style = require('./status.style.cjs'); let react_jsx_runtime = require("react/jsx-runtime"); react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime); //#region src/components/status/status.tsx const { PropsContext: StatusPropsContext, usePropsContext: useStatusPropsContext, withContext, withProvider } = require_create_component.createSlotComponent("status", require_status_style.statusStyle); /** * `Status` is component that indicate the status of a process or state. * * @see https://yamada-ui.com/docs/components/status */ const Status = withProvider(({ children, indicatorProps, labelProps,...rest }) => { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_factory.styled.div, { ...rest, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusIndicator, { ...indicatorProps }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusLabel, { ...labelProps, children })] }); }, "root")(void 0, ({ colorScheme, value = "info",...rest }) => ({ colorScheme: colorScheme ?? value, ...rest })); const StatusIndicator = withContext("div", "indicator")(); const StatusLabel = withContext("p", "label")(); //#endregion exports.Status = Status; exports.StatusPropsContext = StatusPropsContext; exports.useStatusPropsContext = useStatusPropsContext; //# sourceMappingURL=status.cjs.map