From 6d3f013980f3ac6fcd3cad491fc847875f149e90 Mon Sep 17 00:00:00 2001 From: "Adnan.qaops" Date: Fri, 15 Nov 2024 11:14:30 +0500 Subject: [PATCH] Added examples for Existing Components - Demo --- .../examples/ButtonComp/Button.tsx | 1 + .../examples/ButtonComp/DropDownButton.tsx | 37 +-------- .../examples/CalendarInputComp/Date.tsx | 3 + .../examples/CalendarInputComp/DateRange.tsx | 33 ++++++++ .../examples/CalendarInputComp/Time.tsx | 32 ++++++++ .../examples/CalendarInputComp/TimeRange.tsx | 26 +++++++ .../examples/numberInputComp/NumberInput.tsx | 19 +++++ .../examples/numberInputComp/RangeSlider.tsx | 14 ++++ .../examples/numberInputComp/Rating.tsx | 20 ++--- .../examples/numberInputComp/Slider.tsx | 12 +++ .../examples/presentationComp/divider.tsx | 10 ++- .../examples/selectInputComp/MultiSelect.tsx | 14 ++++ .../examples/selectInputComp/Select.tsx | 14 ++++ .../examples/textInputComp/Input.tsx | 77 +++++++++++++++++++ .../examples/textInputComp/Password.tsx | 28 +++++++ .../examples/textInputComp/RichTextEditor.tsx | 48 +++++++++++- .../examples/textInputComp/TextArea.tsx | 24 ++++++ 17 files changed, 365 insertions(+), 47 deletions(-) diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/ButtonComp/Button.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/ButtonComp/Button.tsx index 463033c64..115ea9122 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/ButtonComp/Button.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/ButtonComp/Button.tsx @@ -29,6 +29,7 @@ export default function ButtonExample() { compFactory={ButtonComp} /> + - + - - - + + + + + + ); diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/CalendarInputComp/Time.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/CalendarInputComp/Time.tsx index f22bab5a8..efb8b6b30 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/CalendarInputComp/Time.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/CalendarInputComp/Time.tsx @@ -29,6 +29,7 @@ export default function TimeExample() { config={{ value: trans("componentDoc.noValue"), format: "hh:mm:ss", + placeholder: "Select Time", disabled: false, label: { text: trans("componentDoc.time"), @@ -51,6 +52,7 @@ export default function TimeExample() { compFactory={TimePickerComp} /> + + + + ); diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/CalendarInputComp/TimeRange.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/CalendarInputComp/TimeRange.tsx index 0eae681fa..93d319b0e 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/CalendarInputComp/TimeRange.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/CalendarInputComp/TimeRange.tsx @@ -37,6 +37,7 @@ export default function TimeRangeExample() { title={trans("componentDoc.noDefaultValue")} config={{ format: "hh:mm:ss", + placeholder: "Select Time", disabled: false, label: { text: trans("componentDoc.time"), @@ -64,6 +65,7 @@ export default function TimeRangeExample() { compFactory={TimeRangeComp} /> + + + + ); diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/numberInputComp/NumberInput.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/numberInputComp/NumberInput.tsx index 67c1fb4f7..27745477d 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/numberInputComp/NumberInput.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/numberInputComp/NumberInput.tsx @@ -54,6 +54,7 @@ export default function NumberInputExample() { compFactory={NumberInputComp} /> + + + + + diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/numberInputComp/Rating.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/numberInputComp/Rating.tsx index 6e5dab2fb..540602bf5 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/numberInputComp/Rating.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/numberInputComp/Rating.tsx @@ -16,7 +16,7 @@ export default function RatingExample() { @@ -33,7 +33,7 @@ export default function RatingExample() { title={trans("componentDoc.disabled")} config={{ disabled: "true", - value: "4", + defaultValue: "2", }} compFactory={RatingComp} /> @@ -48,7 +48,7 @@ export default function RatingExample() { position: "row", align: "left", }, - value: "4", + defaultValue: "4", }} compFactory={RatingComp} /> @@ -60,7 +60,7 @@ export default function RatingExample() { position: "row", align: "right", }, - value: "4", + defaultValue: "4", }} compFactory={RatingComp} /> @@ -72,7 +72,7 @@ export default function RatingExample() { position: "column", align: "left", }, - value: "4", + defaultValue: "4", }} compFactory={RatingComp} /> @@ -84,16 +84,17 @@ export default function RatingExample() { position: "column", align: "right", }, - value: "4", + defaultValue: "4", }} compFactory={RatingComp} /> + + diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/presentationComp/divider.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/presentationComp/divider.tsx index a4c131d9c..282ea94bc 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/presentationComp/divider.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/presentationComp/divider.tsx @@ -16,7 +16,13 @@ export default function DividerExample() { title={trans("componentDoc.basicUsage")} description={trans("componentDoc.basicDemoDescription")} > - + @@ -27,6 +33,7 @@ export default function DividerExample() { title: trans("componentDoc.imADivider"), align: "left", color: "#222222", + style: {border: "#000", borderWidth: "2px"}, }} compFactory={DividerComp} /> @@ -51,6 +58,7 @@ export default function DividerExample() { compFactory={DividerComp} /> + + + + + + + + + + + + + ); diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/Password.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/Password.tsx index a27930c39..099aa3793 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/Password.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/Password.tsx @@ -53,6 +53,23 @@ export default function PasswordExample() { }} compFactory={PasswordComp} /> + + + ); diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/RichTextEditor.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/RichTextEditor.tsx index 79a218913..ffbaab53b 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/RichTextEditor.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/RichTextEditor.tsx @@ -10,7 +10,53 @@ export default function InputExample() { title={trans("componentDoc.basicUsage")} description={trans("componentDoc.basicDemoDescription")} > - + + + + + + + + ); diff --git a/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/TextArea.tsx b/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/TextArea.tsx index 6f92542e3..a26f0391a 100644 --- a/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/TextArea.tsx +++ b/client/packages/lowcoder/src/pages/ComponentDoc/examples/textInputComp/TextArea.tsx @@ -18,6 +18,15 @@ export default function ButtonExample() { }} compFactory={TextAreaComp} /> + + + +