Skip to content

Commit

Permalink
feat: changed rich text to multi line text for heading and para
Browse files Browse the repository at this point in the history
  • Loading branch information
surajair committed Apr 30, 2024
1 parent 9e2119d commit c4deb46
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@chaibuilder/runtime",
"private": false,
"version": "0.1.5",
"version": "0.1.6",
"type": "module",
"author": "Suraj Air",
"license": "BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions src/package/default-blocks/heading.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import { HeadingIcon } from "@radix-ui/react-icons";
import { RichText, SelectOption, Styles } from "../controls";
import { MultilineText, SelectOption, Styles } from "../controls";
import { registerChaiBlock } from "../runtime/builder-blocks";
import { ChaiBlock } from "../helper/types/ChaiBlock.ts";

Expand Down Expand Up @@ -48,7 +48,7 @@ registerChaiBlock(HeadingBlock as React.FC<any>, {
],
}),
styles: Styles({ default: "text-3xl" }),
content: RichText({ title: "Content", default: "Heading goes here" }),
content: MultilineText({ title: "Content", default: "Heading goes here" }),
},
});

Expand Down
4 changes: 2 additions & 2 deletions src/package/default-blocks/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";
import { ColumnsIcon, RowsIcon } from "@radix-ui/react-icons";
import { get, isEmpty } from "lodash";
import { cn } from "../helper/lib.ts";
import { RichText, SelectOption, Styles } from "../controls";
import { MultilineText, SelectOption, Styles } from "../controls";
import { registerChaiBlock } from "../runtime/builder-blocks";
import EmptySlot from "./empty-slot";
import { ChaiBlock } from "../helper/types/ChaiBlock.ts";
Expand Down Expand Up @@ -97,7 +97,7 @@ registerChaiBlock(ListItemBlock, {
group: "basic",
props: {
styles: Styles({ default: "" }),
content: RichText({ title: "Content", default: "List item" }),
content: MultilineText({ title: "Content", default: "List item" }),
},
});

Expand Down
5 changes: 3 additions & 2 deletions src/package/default-blocks/paragraph.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from "react";
import { TextIcon } from "@radix-ui/react-icons";
import { RichText, Styles } from "../controls";
import { MultilineText, Styles } from "../controls";
import { registerChaiBlock } from "../runtime/builder-blocks";

import { isNull } from "lodash";

/**
Expand Down Expand Up @@ -36,7 +37,7 @@ registerChaiBlock(ParagraphBlock as React.FC<any>, {
group: "basic",
props: {
styles: Styles({ default: "" }),
content: RichText({
content: MultilineText({
title: "Content",
default:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.",
Expand Down

0 comments on commit c4deb46

Please sign in to comment.