From c1420741de5fd0ed3fcae9277c1bcb14bb054bc0 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Tue, 14 Jan 2025 23:06:24 +0100 Subject: [PATCH 1/2] remove last remnants of rx.chakra --- blog/2024-02-16-reflex-v0-4-0.md | 4 ++++ errors.md | 13 +++++++------ requirements.txt | 1 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/blog/2024-02-16-reflex-v0-4-0.md b/blog/2024-02-16-reflex-v0-4-0.md index 79530d4cc0..5cd638c745 100644 --- a/blog/2024-02-16-reflex-v0-4-0.md +++ b/blog/2024-02-16-reflex-v0-4-0.md @@ -57,6 +57,10 @@ This will convert all components in your app to the new namespace. For example, if you used an `rx.box` in your app, it will be converted to an `rx.chakra.box`. You will still be able to use any Chakra component through the `rx.chakra` namespace. +```md alert +The keep-chakra script was removed in 0.6.0. Use a version that matchs 0.4.0 <= x < 0.6.0 to convert an older app. +``` + The [Chakra Docs](https://chakra.reflex.run) have been moved and updated to reflect the new namespace. ## New Core Components diff --git a/errors.md b/errors.md index d22ab9c9bb..96f3c24683 100644 --- a/errors.md +++ b/errors.md @@ -1,5 +1,6 @@ ```python exec import reflex as rx +import reflex_chakra as rc from pcweb.flexdown import markdown_with_shiki ``` @@ -40,9 +41,9 @@ def markdown_error(text: str): ```python exec def error_message(heading: str, error_code: str, solution: rx.Component, error_type: str = "") -> rx.Component: return rx.el.li( - rx.chakra.accordion( - rx.chakra.accordion_item( - rx.chakra.accordion_button( + rc.accordion( + rc.accordion_item( + rc.accordion_button( rx.box( rx.box( h_comp_error(text=heading), @@ -52,11 +53,11 @@ def error_message(heading: str, error_code: str, solution: rx.Component, error_t rx.text(error_code, class_name="font-code text-violet-9 text-pretty font-medium"), class_name="flex flex-col gap-2.5 text-start", ), - rx.chakra.spacer(), - rx.chakra.accordion_icon(color="var(--c-slate-9)"), + rc.spacer(), + rc.accordion_icon(color="var(--c-slate-9)"), class_name="!bg-transparent !hover:bg-transparent !p-4 lg:!p-6 gap-4 lg:gap-32", ), - rx.chakra.accordion_panel( + rc.accordion_panel( *solution, class_name="!p-[0rem_1rem_1rem_1rem] lg:!p-[0rem_1.5rem_1.5rem_1.5rem] font-small text-slate-11 text-start flex flex-col gap-3 [&>code]:!font-code", ), diff --git a/requirements.txt b/requirements.txt index 156ed44ab4..ccb42d2403 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,3 +16,4 @@ reflex_type_animation==0.0.1 reflex-ag-grid==0.0.10 replicate==0.32.1 reflex-pyplot==0.1.3 +reflex-chakra==0.6.2 \ No newline at end of file From 8e40f87e3f16e0586ee1dce8eb5e24c744a81922 Mon Sep 17 00:00:00 2001 From: Lendemor Date: Tue, 14 Jan 2025 23:09:33 +0100 Subject: [PATCH 2/2] fix codespell --- blog/2024-02-16-reflex-v0-4-0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/2024-02-16-reflex-v0-4-0.md b/blog/2024-02-16-reflex-v0-4-0.md index 5cd638c745..110961428c 100644 --- a/blog/2024-02-16-reflex-v0-4-0.md +++ b/blog/2024-02-16-reflex-v0-4-0.md @@ -58,7 +58,7 @@ For example, if you used an `rx.box` in your app, it will be converted to an `rx You will still be able to use any Chakra component through the `rx.chakra` namespace. ```md alert -The keep-chakra script was removed in 0.6.0. Use a version that matchs 0.4.0 <= x < 0.6.0 to convert an older app. +The keep-chakra script was removed in 0.6.0. Use a version that matches 0.4.0 <= x < 0.6.0 to convert an older app. ``` The [Chakra Docs](https://chakra.reflex.run) have been moved and updated to reflect the new namespace.