PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.22
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.22
1.4.22 1.4.21 1.4.20 1.4.19 1.4.18 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 All 185 releases
disco / backend / views / components / Analytics / components / campaigns / IntentBadge.jsx

IntentBadge.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.22, at backend/views/components/Analytics/components/campaigns/IntentBadge.jsx

23 lines 713 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 const INTENT_STYLES = {
2 Product: { bg: '#f0fdf4', text: '#15803d' },
3 Shipping: { bg: '#eff6ff', text: '#1d4ed8' },
4 Bulk: { bg: '#f5f3ff', text: '#6d28d9' },
5 BOGO: { bg: '#fff7ed', text: '#c2410c' },
6 Bundle: { bg: '#fdf4ff', text: '#86198f' },
7 Cart: { bg: '#fff1f2', text: '#be123c' },
8 };
9
10 const IntentBadge = ({ intent }) => {
11 const style = INTENT_STYLES[intent] ?? { bg: '#f3f4f6', text: '#6b7280' };
12 return (
13 <span
14 className="disco:inline-flex disco:items-center disco:px-2 disco:py-0.5 disco:rounded disco:text-[10px] disco:font-semibold disco:tracking-wide disco:uppercase"
15 style={{ backgroundColor: style.bg, color: style.text }}
16 >
17 {intent}
18 </span>
19 );
20 };
21
22 export default IntentBadge;
23