Skip to content

Commit d24a4f6

Browse files
committed
add enterprise overview page
1 parent 72ec7db commit d24a4f6

File tree

2 files changed

+74
-24
lines changed

2 files changed

+74
-24
lines changed

docs/enterprise/overview.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Reflex Enterprise
2+
3+
```python exec
4+
import reflex as rx
5+
```
6+
7+
Reflex Enterprise is a package containing paid features built on top of Reflex.
8+
9+
See complete docs at [Enterprise Docs](https://enterprise.reflex.dev)
10+
11+
## Installation of reflex_enterprise.
12+
13+
```bash
14+
pip install reflex-enterprise
15+
```
16+
17+
## Usage of reflex_enterprise.
18+
19+
Using `rxe.App` as your `app` is required to use any of the components provided by the enterprise package, as well as config options provided by `rxe.Config`.
20+
21+
### In the main file
22+
23+
Instead of the usual `rx.App()` to create your app, use the following:
24+
```python
25+
import reflex_enterprise as rxe
26+
rxe.App()
27+
```
28+
29+
### In rxconfig.py
30+
```python
31+
import reflex_enterprise as rxe
32+
config = rxe.Config(
33+
app_name="MyApp",
34+
... # you can pass all rx.Config arguments as well as the one specific to rxe.Config
35+
)
36+
```
37+

pcweb/components/docpage/sidebar/sidebar.py

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -351,21 +351,17 @@ def sidebar_comp(
351351
tutorials_index: list[int],
352352
width: str = "100%",
353353
):
354-
from pcweb.pages.docs.recipes_overview import overview
355-
from pcweb.pages.docs.library import library
356-
from pcweb.pages.docs.custom_components import custom_components
357-
from pcweb.pages.docs import (
358-
getting_started,
359-
state,
360-
ui,
361-
hosting as hosting_page,
362-
)
354+
from pcweb.pages.docs import enterprise, getting_started, state, ui
355+
from pcweb.pages.docs import hosting as hosting_page
363356
from pcweb.pages.docs.apiref import pages
364357
from pcweb.pages.docs.cloud import pages as cloud_pages
358+
from pcweb.pages.docs.custom_components import custom_components
359+
from pcweb.pages.docs.library import library
360+
from pcweb.pages.docs.recipes_overview import overview
365361

366-
return rx.box(
362+
return rx.box( # pyright: ignore [reportCallIssue]
367363
# Handle sidebar categories for docs/cloud first
368-
rx.cond(
364+
rx.cond( # pyright: ignore [reportCallIssue]
369365
rx.State.router.page.path.startswith("/docs/hosting/"),
370366
rx.el.ul(
371367
sidebar_category(
@@ -377,24 +373,41 @@ def sidebar_comp(
377373
class_name="flex flex-col items-start gap-1 w-full list-none",
378374
),
379375
# If the path doesn't start with /docs/cloud, check for general docs
380-
rx.cond(
376+
rx.cond( # pyright: ignore [reportCallIssue]
381377
rx.State.router.page.path.startswith("/docs/"),
382378
rx.el.ul(
383379
sidebar_category(
384-
"Learn", getting_started.introduction.path, "graduation-cap", 0
380+
"Learn",
381+
getting_started.introduction.path,
382+
"graduation-cap",
383+
0,
384+
),
385+
sidebar_category(
386+
"Components",
387+
library.path,
388+
"layout-panel-left",
389+
1,
390+
),
391+
sidebar_category(
392+
"API Reference",
393+
pages[0].path,
394+
"book-text",
395+
2,
385396
),
386397
sidebar_category(
387-
"Components", library.path, "layout-panel-left", 1
398+
"Enterprise",
399+
enterprise.overview.path,
400+
"circle-dollar-sign",
401+
3,
388402
),
389-
sidebar_category("API Reference", pages[0].path, "book-text", 2),
390403
class_name="flex flex-col items-start gap-1 w-full list-none",
391404
),
392405
),
393406
),
394407
# Handle the sidebar content based on docs/cloud or docs
395-
rx.cond(
408+
rx.cond( # pyright: ignore [reportCallIssue]
396409
rx.State.router.page.path.startswith("/docs/hosting/"),
397-
rx.match(
410+
rx.match( # pyright: ignore [reportCallIssue]
398411
SidebarState.sidebar_index,
399412
(
400413
0,
@@ -423,9 +436,9 @@ def sidebar_comp(
423436
# ),
424437
# ),
425438
),
426-
rx.cond(
439+
rx.cond( # pyright: ignore [reportCallIssue]
427440
rx.State.router.page.path.startswith("/docs/"),
428-
rx.match(
441+
rx.match( # pyright: ignore [reportCallIssue]
429442
SidebarState.sidebar_index,
430443
(
431444
0,
@@ -474,17 +487,17 @@ def sidebar_comp(
474487
graphing_libs_index,
475488
url,
476489
),
477-
rx.link(
478-
rx.box(
479-
rx.box(
480-
rx.icon("atom", size=16),
490+
rx.link( # pyright: ignore [reportCallIssue]
491+
rx.box( # pyright: ignore [reportCallIssue]
492+
rx.box( # pyright: ignore [reportCallIssue]
493+
rx.icon("atom", size=16), # pyright: ignore [reportCallIssue]
481494
rx.el.h5(
482495
"Custom Components",
483496
class_name="font-smbold text-[0.875rem] text-slate-12 leading-5 tracking-[-0.01313rem] transition-color",
484497
),
485498
class_name="flex flex-row items-center gap-3 text-slate-12",
486499
),
487-
rx.text(
500+
rx.text( # pyright: ignore [reportCallIssue]
488501
"See what components people have made with Reflex!",
489502
class_name="font-small text-slate-9",
490503
),

0 commit comments

Comments
 (0)