import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { Icon } from 'flavours/glitch/components/icon'; import ArrowRightAltIcon from 'mastodon/../material-icons/400-24px/arrow_right_alt.svg?react'; import CheckIcon from 'mastodon/../material-icons/400-24px/done.svg?react'; export const Step = ({ label, description, icon, iconComponent, completed, onClick, href, to }) => { const content = ( <>
{label}

{description}

{completed ? : }
); if (href) { return ( {content} ); } else if (to) { return ( {content} ); } return ( ); }; Step.propTypes = { label: PropTypes.node, description: PropTypes.node, icon: PropTypes.string, iconComponent: PropTypes.func, completed: PropTypes.bool, href: PropTypes.string, to: PropTypes.string, onClick: PropTypes.func, };