PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.5
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.5
4.9.5 4.9.4 4.9.3 4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 All 203 releases
betterdocs / react-src / admin / analytics / components / ProTeaser.js

ProTeaser.js in BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot 4.9.5, at react-src/admin/analytics/components/ProTeaser.js

29 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from "@wordpress/i18n";
2 import React from "react";
3 import { I } from "./common/icons";
4 import { cn, ProBadge } from "./common/ui";
5
6 /* Pro upgrade target — falls back to the public pricing page; if the host site
7 localises a different URL (e.g. an affiliate link) we honour that. */
8 export function upgradeUrl() {
9 return ( window.betterdocs_admin && window.betterdocs_admin.upgrade_url )
10 || "https://betterdocs.co/dashboard-upgrade-to-pro";
11 }
12
13 /* Pro teaser card body. Used as the content of a full-tab teaser (default) or
14 as a `compact` variant slotted inside an existing card (e.g. Search Trends). */
15 export default function ProTeaser( { title, subtitle, feature, icon, compact = false } ) {
16 const Icon = icon || I.Sparkle;
17 return (
18 <div className={ cn( "bda-teaser", compact && "compact" ) }>
19 { feature && <ProBadge /> }
20 <span className="bda-teaser-ico"><Icon size={ compact ? 18 : 22 } /></span>
21 <h3 className="bda-teaser-title">{ title || __( "Available in BetterDocs Pro", "betterdocs" ) }</h3>
22 { subtitle && <p className="bda-teaser-sub">{ subtitle }</p> }
23 <a className="bda-btn primary sm" href={ upgradeUrl() } target="_blank" rel="noopener noreferrer">
24 { __( "Upgrade Now", "betterdocs" ) } <I.ArrowRight size={ 12 } />
25 </a>
26 </div>
27 );
28 }
29