From ebf626d57baaca6c0607a0a22041b63f88712d1f Mon Sep 17 00:00:00 2001 From: Marin Bratanov Date: Thu, 11 Mar 2021 20:42:37 +0200 Subject: [PATCH 01/10] chore(colorPalette): skeleton --- _config.yml | 4 +- components/colorpalette/custom-colors.md | 23 +++++++ components/colorpalette/events.md | 23 +++++++ components/colorpalette/overview.md | 87 ++++++++++++++++++++++++ components/colorpalette/predefined.md | 23 +++++++ 5 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 components/colorpalette/custom-colors.md create mode 100644 components/colorpalette/events.md create mode 100644 components/colorpalette/overview.md create mode 100644 components/colorpalette/predefined.md diff --git a/_config.yml b/_config.yml index be82a353a0..1e6e61f0ac 100644 --- a/_config.yml +++ b/_config.yml @@ -219,7 +219,8 @@ navigation: "*chunkprogressbar": title: "ChunkProgressBar" "*colorpalette": - title: "ColorPalette" + title: "Color Palette" + isNew: true "*colorpicker": title: "ColorPicker" "*/multicolumncombobox": @@ -405,6 +406,7 @@ intro_columns: "HTML Editor": "editor-overview" "Slider": "slider-overview" "RangeSlider": "rangeslider-overview" + "Color Palette": "colorpalette-overview" - categories: diff --git a/components/colorpalette/custom-colors.md b/components/colorpalette/custom-colors.md new file mode 100644 index 0000000000..b0c9597abe --- /dev/null +++ b/components/colorpalette/custom-colors.md @@ -0,0 +1,23 @@ +--- +title: Custom Colors +page_title: Color Palette - Custom Colors +description: Custom Colors in the Color Palette for Blazor. +slug: colorpalette-custom-colors +tags: telerik,blazor,Color,Palette,Custom,Colors +published: true +position: 15 +--- + +# Custom Colors + +This article shows how to create your own sets of colors for the Telerik Color Palette for Blazor: + + + + + + +## See Also + +* [ValueChanged and Validation]({%slug value-changed-validation-model%}) +* [Fire OnChange Only Once]({%slug ddl-kb-onchange-fires-twice%}) diff --git a/components/colorpalette/events.md b/components/colorpalette/events.md new file mode 100644 index 0000000000..98d18c3484 --- /dev/null +++ b/components/colorpalette/events.md @@ -0,0 +1,23 @@ +--- +title: Events +page_title: Color Palette - Events +description: Events in the Color Palette for Blazor. +slug: colorpalette-events +tags: telerik,blazor,Color,Palette,events +published: true +position: 50 +--- + +# Events + +This article explains the events available in the Telerik Color Palette for Blazor: + + +* [ValueChanged](#valuechanged) + + + +## See Also + +* [ValueChanged and Validation]({%slug value-changed-validation-model%}) +* [Fire OnChange Only Once]({%slug ddl-kb-onchange-fires-twice%}) diff --git a/components/colorpalette/overview.md b/components/colorpalette/overview.md new file mode 100644 index 0000000000..0b3bd8addb --- /dev/null +++ b/components/colorpalette/overview.md @@ -0,0 +1,87 @@ +--- +title: Overview +page_title: Color Palette Overview +description: Overview of the Color Palette for Blazor. +slug: colorpalette-overview +tags: telerik,blazor,masked,Color,Palette,overview +published: True +position: 0 +--- + +# Color Palette Overview + +The Blazor Color Palette component provides a list of color tiles for the user to pick a color from by clicking or tapping. You can choose a predefined list of colors, or create your own. Two-way binding and events let you react to the user choice. + +## Basics + +To use a Telerik Color Palette for Blazor: + +1. Add the `` tag. +1. Bind its `Value` to the `string` you want to get out of it. +1. Choose a set of colors (the example below uses one of the predefined options). + +>caption Basic color palette with two-way value binding and a predefined palette + +````CSHTML +@MyColor +
+ + + + +@code { + public string MyColor { get; set; } +} +```` + +>caption The result from the code snippet above before you start writing + +![Color Palette first look](images/color-palette-first-look.png) + + +## Features + +>caption The Masked Textbox provides the following features: + +* `Class` - the CSS class that will be rendered on the wrapping element of the component. + +* `Enabled` - whether the `input` is enabled. + +* `Id` - renders as the `id` attribute on the `` element, so you can attach a `