From 47a98fbf44103b4dd96a2e3859907abae57b68f5 Mon Sep 17 00:00:00 2001 From: Monica Wheeler Date: Thu, 26 Oct 2023 20:17:51 -0500 Subject: [PATCH] docs(hero): react - add prop definitions --- packages/sage-react/lib/Hero/Hero.jsx | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/packages/sage-react/lib/Hero/Hero.jsx b/packages/sage-react/lib/Hero/Hero.jsx index 4d906d665a..c6e5f1c9bb 100644 --- a/packages/sage-react/lib/Hero/Hero.jsx +++ b/packages/sage-react/lib/Hero/Hero.jsx @@ -99,19 +99,55 @@ Hero.defaultProps = { }; Hero.propTypes = { + /** + * If true, will remove the border. + */ borderless: PropTypes.bool, + /** + * The attributes for the CTA link. + */ ctaAttributes: PropTypes.node, + /** + * The content to be rendered within the Hero. + */ children: PropTypes.node, + /** + * If true, the image will not fill the space. + */ contained: PropTypes.bool, + /** + * The background color to be applied to the Hero. + */ customBackgroundColor: PropTypes.string, + /** + * The description to be rendered within the Hero. + */ description: PropTypes.string, + /** + * The actions to be rendered within the Hero's footer. + */ footerActions: PropTypes.node, + /** + * The image to be rendered within the Hero. + */ image: PropTypes.shape({ alt: PropTypes.string, src: PropTypes.string }), + /** + * If true, the image will be rendered before the content. + */ imageStart: PropTypes.bool, + /** + * Sets the size of the Hero's width. + */ heroSize: PropTypes.oneOf(Hero.Sizes), + /** + * The title to be rendered within the Hero. + */ title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), + /** + * The HTML tag to be applied to the title. + */ titleTag: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6']) };