UNPKG

@shopify/cli-kit

Version:

A set of utilities, interfaces, and models that are common across all the platform features

15 lines 779 B
import { Alert } from './components/Alert.js'; import { renderOnce } from '../ui.js'; import React from 'react'; const typeToLogLevel = { info: 'info', warning: 'warn', success: 'info', error: 'error', }; export function alert({ type, headline, body, nextSteps, reference, link, customSections, orderedNextSteps = false, renderOptions, }) { // eslint-disable-next-line prefer-rest-params const { type: alertType, ..._eventProps } = arguments[0]; return renderOnce(React.createElement(Alert, { type: type, headline: headline, body: body, nextSteps: nextSteps, reference: reference, link: link, orderedNextSteps: orderedNextSteps, customSections: customSections }), { logLevel: typeToLogLevel[type], renderOptions }); } //# sourceMappingURL=alert.js.map