PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.3.34
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.3.34
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.34, at backend/views/components/Main/pages/Rules/Tabs/DesignBlock/TextHighlight/TextHighlight.jsx

47 lines 1.5 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
11 const TextHighlight = () => {
12 const { text_highlight } = useSelector(
13 (state) => state.discount.design_blocks
14 );
15 const isPro = useIsPro();
16 const tryNowUrl =
17 'https://discoplugin.com/pricing/?utm_source=bulk-table&utm_medium=free-to-pro&utm_campaign=from-display-page&utm_id=1';
18
19 const dispatch = useDispatch();
20
21 const handleStatus = (status) => {
22 dispatch(updateTextHighlight({ name: 'enable', value: status }));
23 };
24
25 return (
26 <BadgeComponentContainer>
27 <TextHighlightCard />
28 <BadgeTitle title="Text Highlight" url="" className="disco-mt-3" />
29 <BadgeActions>
30 <Status
31 status={text_highlight?.enable || false}
32 handleStatus={handleStatus}
33 disabled={!isPro}
34 dataTestid="text-highlight-status"
35 />
36 <ProFeatureButton
37 tryNowUrl={tryNowUrl}
38 componentToEdit="TextHighlightEdit"
39 testId="text-highlight"
40 />
41 </BadgeActions>
42 </BadgeComponentContainer>
43 );
44 };
45
46 export default TextHighlight;
47