Skip to content

Added examples for Existing Components - Demo #1308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function ButtonExample() {
compFactory={ButtonComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.style")}>
<Example
title={trans("componentDoc.danger")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@ export default function DropdownExample() {
blackListConfig={blackListConfig}
compFactory={DropdownComp}
/>
<Example
title={trans("componentDoc.loading")}
width={120}
config={{
type: "default",
text: trans("componentDoc.menu"),
loading: true,
options: options,
}}
blackListConfig={blackListConfig}
compFactory={DropdownComp}
/>
<Example
title={trans("componentDoc.disabled")}
width={120}
Expand All @@ -68,31 +56,8 @@ export default function DropdownExample() {
compFactory={DropdownComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.style")}>
<Example
title={trans("componentDoc.danger")}
width={120}
config={{
style: { backgroundColor: "#CD574C", borderColor: "#AC3A32", color: "#e0ecf6" },
}}
compFactory={DropdownComp}
/>
<Example
title={trans("componentDoc.warning")}
width={120}
config={{
style: { backgroundColor: "#F4A125", borderColor: "#DA7D16", color: "#000000" },
}}
compFactory={DropdownComp}
/>
<Example
title={trans("componentDoc.success")}
width={120}
config={{
style: { backgroundColor: "#5E8D6E", borderColor: "#40694E", color: "#e0ecf6" },
}}
compFactory={DropdownComp}
/>
<Example
title={trans("componentDoc.onlyMenu")}
width={120}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default function DateExample() {
config={{
value: trans("componentDoc.noValue"),
format: "YYYY-MM-DD",
placeholder: "Select Date",
disabled: false,
label: {
text: trans("componentDoc.date"),
Expand All @@ -51,6 +52,7 @@ export default function DateExample() {
compFactory={DatePickerComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.labelText")} description="">
<Example
title={trans("componentDoc.leftLeftAlign")}
Expand Down Expand Up @@ -101,6 +103,7 @@ export default function DateExample() {
compFactory={DatePickerComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.validation")}>
<Example
title={trans("componentDoc.required")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default function DateRangeExample() {
compFactory={DateRangeComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.labelText")} description="">
<Example
title={trans("componentDoc.leftLeftAlign")}
Expand Down Expand Up @@ -132,6 +133,7 @@ export default function DateRangeExample() {
compFactory={DateRangeComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.validation")}>
<Example
title={trans("componentDoc.required")}
Expand Down Expand Up @@ -164,6 +166,37 @@ export default function DateRangeExample() {
blackListConfig={blackListConfig.slice(0, 3)}
compFactory={DateRangeComp}
/>
<Example
title="Show Time"
config={{
required: true,
showTime: true,
label: {
text: trans("componentDoc.date"),
position: "column",
align: "left",
},
}}
nameMap={nameMap}
blackListConfig={blackListConfig.slice(0, 3)}
compFactory={DateRangeComp}
/>
<Example
title="Show Time ( 12 hours format )"
config={{
required: true,
showTime: true,
use12Hours: true,
label: {
text: trans("componentDoc.date"),
position: "column",
align: "left",
},
}}
nameMap={nameMap}
blackListConfig={blackListConfig.slice(0, 3)}
compFactory={DateRangeComp}
/>
</ExampleGroup>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -51,6 +52,7 @@ export default function TimeExample() {
compFactory={TimePickerComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.labelText")} description="">
<Example
title={trans("componentDoc.leftLeftAlign")}
Expand Down Expand Up @@ -101,6 +103,7 @@ export default function TimeExample() {
compFactory={TimePickerComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.validation")}>
<Example
title={trans("componentDoc.required")}
Expand All @@ -126,6 +129,35 @@ export default function TimeExample() {
blackListConfig={blackListConfig}
compFactory={TimePickerComp}
/>
<Example
title="Time Steps"
config={{
required: true,
hourStep: "2",
minuteStep: "10",
secondStep: "30",
label: {
text: trans("componentDoc.time"),
},
}}
blackListConfig={blackListConfig}
compFactory={TimePickerComp}
/>
<Example
title= "Show Time ( 12 Hours format )"
config={{
required: true,
hourStep: "2",
minuteStep: "10",
secondStep: "30",
use12Hours: true,
label: {
text: trans("componentDoc.time"),
},
}}
blackListConfig={blackListConfig}
compFactory={TimePickerComp}
/>
</ExampleGroup>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -64,6 +65,7 @@ export default function TimeRangeExample() {
compFactory={TimeRangeComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.labelText")} description="">
<Example
title={trans("componentDoc.leftLeftAlign")}
Expand Down Expand Up @@ -120,6 +122,7 @@ export default function TimeRangeExample() {
compFactory={TimeRangeComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.validation")}>
<Example
title={trans("componentDoc.required")}
Expand Down Expand Up @@ -150,6 +153,29 @@ export default function TimeRangeExample() {
blackListConfig={blackListConfig}
compFactory={TimeRangeComp}
/>
<Example
title="Time Steps"
config={{
required: true,
hourStep: "2",
minuteStep: "5",
secondStep: "15",
}}
blackListConfig={blackListConfig}
compFactory={TimeRangeComp}
/>
<Example
title="Show Time ( 12 hours format )"
config={{
required: true,
hourStep: "2",
minuteStep: "5",
secondStep: "15",
use12Hours: true,
}}
blackListConfig={blackListConfig}
compFactory={TimeRangeComp}
/>
</ExampleGroup>
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export default function NumberInputExample() {
compFactory={NumberInputComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.format")} description="">
<Example
title={trans("componentDoc.percent")}
Expand All @@ -79,7 +80,25 @@ export default function NumberInputExample() {
}}
compFactory={NumberInputComp}
/>
<Example
title="Step"
config={{
value: "1",
step: "10",
}}
compFactory={NumberInputComp}
/>
<Example
title="Hide Increment/Decrement buttons"
config={{
value: "1",
step: "10",
controls: false,
}}
compFactory={NumberInputComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.validation")}>
<Example
title={trans("componentDoc.mostValue")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ export default function RangeSliderExample() {
}}
compFactory={RangeSliderComp}
/>
<Example
title={trans("componentDoc.default")}
config={{
value: "60",
disabled: "false",
start: "10",
end: "70",
min: "0",
max: "100",
step: "10",
vertical: true,
}}
compFactory={RangeSliderComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.labelText")} description="">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function RatingExample() {
<Example
title={trans("componentDoc.default")}
config={{
value: "4",
defaultValue: "4",
disabled: "false",
}}
compFactory={RatingComp}
Expand All @@ -25,15 +25,15 @@ export default function RatingExample() {
title={trans("componentDoc.notSelect")}
config={{
disabled: "false",
value: "0",
defaultValue: "0",
}}
compFactory={RatingComp}
/>
<Example
title={trans("componentDoc.disabled")}
config={{
disabled: "true",
value: "4",
defaultValue: "2",
}}
compFactory={RatingComp}
/>
Expand All @@ -48,7 +48,7 @@ export default function RatingExample() {
position: "row",
align: "left",
},
value: "4",
defaultValue: "4",
}}
compFactory={RatingComp}
/>
Expand All @@ -60,7 +60,7 @@ export default function RatingExample() {
position: "row",
align: "right",
},
value: "4",
defaultValue: "4",
}}
compFactory={RatingComp}
/>
Expand All @@ -72,7 +72,7 @@ export default function RatingExample() {
position: "column",
align: "left",
},
value: "4",
defaultValue: "4",
}}
compFactory={RatingComp}
/>
Expand All @@ -84,16 +84,17 @@ export default function RatingExample() {
position: "column",
align: "right",
},
value: "4",
defaultValue: "4",
}}
compFactory={RatingComp}
/>
</ExampleGroup>

<ExampleGroup title={trans("componentDoc.style")}>
<Example
title={trans("componentDoc.maxRating")}
config={{
value: "4",
defaultValue: "4",
max: "6",
}}
nameMap={nameMap}
Expand All @@ -102,7 +103,8 @@ export default function RatingExample() {
<Example
title={trans("componentDoc.halfSelect")}
config={{
value: "4.5",
max: "6",
defaultValue: "3.5",
allowHalf: "true",
}}
compFactory={RatingComp}
Expand Down
Loading
Loading