tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

WidgetsFeatureHighlight.jsx (1260B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
      4 
      5 import { useSelector } from "react-redux";
      6 import { FeatureHighlight } from "./FeatureHighlight";
      7 
      8 function WidgetsFeatureHighlight({ handleDismiss, handleBlock, dispatch }) {
      9  const { messageData } = useSelector(state => state.Messages);
     10 
     11  return (
     12    <FeatureHighlight
     13      position="inset-inline-center inset-block-end"
     14      arrowPosition="arrow-top-center"
     15      openedOverride={true}
     16      showButtonIcon={false}
     17      feature={messageData?.content?.feature}
     18      modalClassName="widget-highlight-wrapper"
     19      message={
     20        <div className="widget-highlight">
     21          <img
     22            src="chrome://newtab/content/data/content/assets/widget-message.png"
     23            alt=""
     24          />
     25          <h3 data-l10n-id="newtab-widget-message-title" />
     26          <p data-l10n-id="newtab-widget-message-copy" />
     27        </div>
     28      }
     29      dispatch={dispatch}
     30      dismissCallback={() => {
     31        handleDismiss();
     32        handleBlock();
     33      }}
     34      outsideClickCallback={handleDismiss}
     35    />
     36  );
     37 }
     38 
     39 export { WidgetsFeatureHighlight };