HelpButton.tsx 372 B

1234567891011121314151617181920
  1. import { HelpIcon } from "./icons";
  2. type HelpButtonProps = {
  3. title?: string;
  4. name?: string;
  5. id?: string;
  6. onClick?(): void;
  7. };
  8. export const HelpButton = (props: HelpButtonProps) => (
  9. <button
  10. className="help-icon"
  11. onClick={props.onClick}
  12. type="button"
  13. title={`${props.title} — ?`}
  14. aria-label={props.title}
  15. >
  16. {HelpIcon}
  17. </button>
  18. );