UNPKG

@carbon/ibm-products

Version:

Carbon for IBM Products

84 lines (79 loc) 2.76 kB
/** * Copyright IBM Corp. 2020, 2025 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js'); var React = require('react'); var index = require('../../_virtual/index.js'); var devtools = require('../../global/js/utils/devtools.js'); var settings = require('../../settings.js'); var Card = require('../Card/Card.js'); const componentName = 'GetStartedCard'; /** * GetStartedCard a card with icon, number, and media variants */ exports.GetStartedCard = /*#__PURE__*/React.forwardRef((props, ref) => { return /*#__PURE__*/React.createElement(Card.Card, _rollupPluginBabelHelpers.extends({}, props, { ref, getStarted: true }, devtools.getDevtoolsProps(componentName))); }); // Return a placeholder if not released and not enabled by feature flag exports.GetStartedCard = settings.pkg.checkComponentEnabled(exports.GetStartedCard, componentName); exports.GetStartedCard.displayName = componentName; exports.GetStartedCard.propTypes = { /** * Provide an optional class to be applied to the containing node. */ className: index.default.string, /** * Optional if the card should be disabled */ disabled: index.default.bool, /** * Provides the action icon that's displayed at the footer of the card */ /**@ts-ignore */ footerActionIcon: index.default.oneOfType([index.default.func, index.default.object]), /** * Optional label for the top of the card */ label: index.default.oneOfType([index.default.string, index.default.node]), /** * Optional media content like an image to be placed in the card */ media: index.default.node, /** * Icons that are displayed on the card showing the time and skill needed */ /**@ts-ignore */ metadata: index.default.arrayOf(index.default.shape({ id: index.default.string, icon: index.default.oneOfType([index.default.func, index.default.object]), iconDescription: index.default.string })), /** * Provides the callback for a clickable card */ onClick: index.default.func.isRequired, /** * Provides the icon that's displayed at the top of the card */ /**@ts-ignore */ pictogram: index.default.oneOfType([index.default.func, index.default.object]), /** * Provides number for card for tasks in a sequential order */ sequence: index.default.number, /** * Provides the status that's displayed at the top of the card */ status: index.default.oneOf(['complete', 'incomplete']), /** * Title that's displayed at the top of the card */ title: index.default.oneOfType([index.default.string, index.default.node]) };