/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ import React from "react"; import { Localized } from "./MSLocalized"; export const CTAParagraph = props => { const { content, handleAction } = props; if (!content?.text) { return null; } return (

{content.text.string_name && typeof handleAction === "function" ? ( ["Enter", " "].includes(event.key) ? handleAction(event) : null } value="cta_paragraph" role="button" tabIndex="0" > {" "} {/* is valid here because of click and keyup handling. */} {/*

); };