PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.3.54
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.3.54
1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 All 180 releases
disco / backend / views / components / Main / pages / Rules / Tabs / DesignBlock / TextHighlight / TextHighlight.jsx

TextHighlight.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.3.54, at backend/views/components/Main/pages/Rules/Tabs/DesignBlock/TextHighlight/TextHighlight.jsx

52 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { useDispatch, useSelector } from 'react-redux';
2 import { updateTextHighlight } from '../../../../../features/discount/discountSlice';
3 import useIsPro from '../../../../../hooks/useIsPro';
4 import BadgeActions from '../components/BadgeActions';
5 import BadgeComponentContainer from '../components/BadgeComponentContainer';
6 import BadgeTitle from '../components/BadgeTitle';
7 import ProFeatureButton from '../components/ProFeatureButton';
8 import Status from '../components/Status';
9 import TextHighlightCard from './components/TextHighlightCard';
10 import { __ } from '@wordpress/i18n';
11
12 const TextHighlight = () => {
13 const { text_highlight } = useSelector(
14 (state) => state.discount.design_blocks
15 );
16 const isPro = useIsPro();
17 const tryNowUrl =
18 'https://discoplugin.com/pricing/?utm_source=bulk-table&utm_medium=free-to-pro&utm_campaign=from-display-page&utm_id=1';
19
20 const dispatch = useDispatch();
21
22 const handleStatus = (status) => {
23 dispatch(updateTextHighlight({ name: 'enable', value: status }));
24 };
25
26 return (
27 <BadgeComponentContainer>
28 <TextHighlightCard />
29 <BadgeTitle
30 title={__('Text Highlight', 'disco')}
31 url="https://discoplugin.com/docs/display-text-highlight/"
32 className="disco-mt-3"
33 />
34 <BadgeActions>
35 <Status
36 status={text_highlight?.enable || false}
37 handleStatus={handleStatus}
38 disabled={!isPro}
39 dataTestid="text-highlight-status"
40 />
41 <ProFeatureButton
42 tryNowUrl={tryNowUrl}
43 componentToEdit="TextHighlightEdit"
44 testId="text-highlight"
45 />
46 </BadgeActions>
47 </BadgeComponentContainer>
48 );
49 };
50
51 export default TextHighlight;
52