| 1 |
import { __ } from "@wordpress/i18n"; |
| 2 |
import React from "react"; |
| 3 |
|
| 4 |
import LockedPreview from "../analytics/components/modules/LockedPreview"; |
| 5 |
import ApiDocsMock from "./ApiDocsMock"; |
| 6 |
import "../analytics/scss/dashboard.scss"; |
| 7 |
import "./api-docs-teaser.scss"; |
| 8 |
|
| 9 |
/** |
| 10 |
* Free's API Docs screen — a locked teaser for the Pro feature, built on the |
| 11 |
* same `LockedPreview` shell the Analytics modules use so both upsells read as |
| 12 |
* one design. Free only registers this route when Pro does not ship API Docs |
| 13 |
* (see `betterdocs_admin.has_api_docs`); once Pro is active its real screen |
| 14 |
* takes the `betterdocs-api-docs` route instead. |
| 15 |
*/ |
| 16 |
export default function ApiDocsTeaser() { |
| 17 |
return ( |
| 18 |
<div className="betterdocs-dashboard-body betterdocs-dashboard-container bd-apit-wrapper"> |
| 19 |
<LockedPreview |
| 20 |
title={ __( "API Documentation is a Pro feature", "betterdocs" ) } |
| 21 |
subtitle={ __( "Upload an OpenAPI or Postman file — or point BetterDocs at its URL — and every endpoint becomes a real doc inside your knowledge base, searchable, styled like the rest of your docs, and re-synced whenever the spec changes.", "betterdocs" ) } |
| 22 |
bullets={ [ |
| 23 |
__( "OpenAPI 3.x, Swagger 2.0 & Postman collections", "betterdocs" ), |
| 24 |
__( "Every endpoint generated as a native, searchable doc", "betterdocs" ), |
| 25 |
__( "Built-in \"Try it\" console with live request samples", "betterdocs" ), |
| 26 |
__( "Re-sync from a URL to keep docs matching your API", "betterdocs" ) |
| 27 |
] } |
| 28 |
> |
| 29 |
<ApiDocsMock /> |
| 30 |
</LockedPreview> |
| 31 |
</div> |
| 32 |
); |
| 33 |
} |
| 34 |
|