// We do not want to install dependencies, this file is only here as example of prop table generation // eslint-disable-next-line import/no-unresolved import React from 'react'; import type { GreetingProps } from './Greeting.types'; /** * Greeting component */ const Greeting: React.FC = ({ displayOptions, names, greeting = 'Hello', heading = null, }) => { let headingEl = null; if (heading != null) { const HeadingTag = `h${heading.level}` headingEl = ( {heading.text} ); } const ContainerTag = displayOptions.bold ? 'strong' : 'span'; return (
{headingEl} {greeting}, {' '} {names.join(', ')}
); }; export default Greeting;