@carbon/ibm-products
Version:
Carbon for IBM Products
87 lines (85 loc) • 2.45 kB
JavaScript
/**
* Copyright IBM Corp. 2020, 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 { getDevtoolsProps } from "../../global/js/utils/devtools.js";
import { Card } from "../Card/Card.js";
import React from "react";
import PropTypes from "prop-types";
//#region src/components/GetStartedCard/GetStartedCard.tsx
/**
* Copyright IBM Corp. 2024, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const componentName = "GetStartedCard";
/**
* GetStartedCard a card with icon, number, and media variants
*/
const GetStartedCard = React.forwardRef((props, ref) => {
return /* @__PURE__ */ React.createElement(Card, {
...props,
ref,
getStarted: true,
...getDevtoolsProps(componentName)
});
});
GetStartedCard.displayName = componentName;
GetStartedCard.propTypes = {
/**
* Provide an optional class to be applied to the containing node.
*/
className: PropTypes.string,
/**
* Optional if the card should be disabled
*/
disabled: PropTypes.bool,
/**
* Provides the action icon that's displayed at the footer of the card
*/
/**@ts-ignore */
footerActionIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
/**
* Optional label for the top of the card
*/
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
/**
* Optional media content like an image to be placed in the card
*/
media: PropTypes.node,
/**
* Icons that are displayed on the card showing the time and skill needed
*/
/**@ts-ignore */
metadata: PropTypes.arrayOf(PropTypes.shape({
id: PropTypes.string,
icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
iconDescription: PropTypes.string
})),
/**
* Provides the callback for a clickable card
*/
onClick: PropTypes.func.isRequired,
/**
* Provides the icon that's displayed at the top of the card
*/
/**@ts-ignore */
pictogram: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
/**
* Provides number for card for tasks in a sequential order
*/
sequence: PropTypes.number,
/**
* Provides the status that's displayed at the top of the card
*/
status: PropTypes.oneOf(["complete", "incomplete"]),
/**
* Title that's displayed at the top of the card
*/
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
};
//#endregion
export { GetStartedCard };