Skip to content

Commit 5e2f5ec

Browse files
Dimo DimovDimo Dimov
authored andcommitted
docs: Update Loader Size and ThemeColor
1 parent 3eb6b59 commit 5e2f5ec

File tree

6 files changed

+23
-14
lines changed

6 files changed

+23
-14
lines changed

_contentTemplates/loaders/size.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#loaders-size
22

3-
There are three predefined sizes for the loader that you can set through its `Size` parameter that takes a member of the `Telerik.Blazor.Components.LoaderSize` enum:
3+
There are three predefined sizes for the loader that you can set through its `Size` parameter (`string`). You can use the predefined properties in the `Telerik.Blazor.ThemeConstants.Loader.Size` static class:
44

5-
* `Small`
6-
* `Medium` - the default value
7-
* `Large`
5+
* `Small` (equals `"sm"`)
6+
* `Medium` (equals `"md"`) - the default value
7+
* `Large` (equals `"lg"`)
88

99
You can see them in action in the [Loader Overview](https://demos.telerik.com/blazor-ui/loader/overview) Live Demo.
1010

@@ -13,14 +13,22 @@ You can see them in action in the [Loader Overview](https://demos.telerik.com/bl
1313
![loader size](images/loader-size.png)
1414

1515
````CSHTML
16-
@foreach (LoaderSize size in Enum.GetValues(typeof(Telerik.Blazor.Components.LoaderSize)))
16+
@foreach (string size in LoaderSizes)
1717
{
1818
<div style="float: left; margin: 20px;">
1919
@size
2020
<br /><br />
2121
<TelerikLoader Size="@size"></TelerikLoader>
2222
</div>
2323
}
24+
25+
@code {
26+
List<string> LoaderSizes { get; set; } = new List<string>() {
27+
ThemeConstants.Loader.Size.Small,
28+
ThemeConstants.Loader.Size.Medium,
29+
ThemeConstants.Loader.Size.Large
30+
};
31+
}
2432
````
2533

2634
#end

_contentTemplates/loaders/themeColor.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#loaders-theme-color
22

3-
The color of the animated loading icon is controlled through the `ThemeColor` parameter. You can set it to a member of the `Telerik.Blazor.ThemeColor` class:
3+
The color of the animated loading icon is controlled through the `ThemeColor` parameter. You can set it to a string property of the static `ThemeConstants.Loader.ThemeColor` class:
44

55
* `Primary`
66
* `Secondary`
@@ -19,6 +19,7 @@ These predefined options match the main [Telerik Theme]({%slug general-informati
1919
2020
![Loader Theme Colors](images/loader-built-in-theme-colors.png)
2121

22+
<!--
2223
````CSHTML
2324
@{
2425
var fields = typeof(Telerik.Blazor.ThemeColors)
@@ -36,6 +37,7 @@ These predefined options match the main [Telerik Theme]({%slug general-informati
3637
}
3738
}
3839
````
40+
-->
3941

4042
The `ThemeColor` parameter renders as the `k-loader-<ThemeColor>` CSS class on the wrapping element and you can set it to a custom value to cascade through and set the color to a setting of your own without customizing the entire theme.
4143

@@ -53,4 +55,3 @@ The `ThemeColor` parameter renders as the `k-loader-<ThemeColor>` CSS class on t
5355
````
5456

5557
#end
56-

common-features/loading-sign.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ This sample shows only an indicator for the initial data load, only the DELETE o
8484
<TelerikLoaderContainer OverlayThemeColor="light" Visible="@( !InitialDataLoadComplete )"
8585
Text="@null">
8686
<Template>
87-
<TelerikLoader Type="@LoaderType.InfiniteSpinner" Size="@LoaderSize.Large"></TelerikLoader>
87+
<TelerikLoader Type="@LoaderType.InfiniteSpinner" Size="@ThemeConstants.Loader.Size.Large"></TelerikLoader>
8888
</Template>
8989
</TelerikLoaderContainer>
9090
@@ -151,7 +151,7 @@ This sample shows only an indicator for the initial data load, only the DELETE o
151151
<TelerikLoaderContainer OverlayThemeColor="light" Visible="@( !InitialDataLoadComplete )"
152152
Text="@null">
153153
<Template>
154-
<TelerikLoader Type="@LoaderType.InfiniteSpinner" Size="@LoaderSize.Large"></TelerikLoader>
154+
<TelerikLoader Type="@LoaderType.InfiniteSpinner" Size="@ThemeConstants.Loader.Size.Large"></TelerikLoader>
155155
</Template>
156156
</TelerikLoaderContainer>
157157

components/loader/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ You can devise such a loading panel as needed by your app, and place a Telerik L
9898
@* sample loading panel, styles are at the end *@
9999
<div class="loading-panel-wrapper">
100100
<div class="loading-panel-overlay"></div>
101-
<TelerikLoader Size="@LoaderSize.Large" Type="@LoaderType.ConvergingSpinner" ThemeColor="@ThemeColors.Tertiary" />
101+
<TelerikLoader Size="@ThemeConstants.Loader.Size.Large" Type="@LoaderType.ConvergingSpinner" ThemeColor="@ThemeConstants.Loader.ThemeColor.Tertiary" />
102102
</div>
103103
}
104104
<TelerikGrid Data="@GridData" Height="500px" Pageable="true" AutoGenerateColumns="true">
@@ -111,7 +111,7 @@ You can devise such a loading panel as needed by your app, and place a Telerik L
111111
here we just copy it to showcase the concept of showing a loading sign *@
112112
<div class="loading-panel-wrapper">
113113
<div class="loading-panel-overlay"></div>
114-
<TelerikLoader Size="@LoaderSize.Large" Type="@LoaderType.ConvergingSpinner" ThemeColor="@ThemeColors.Tertiary" />
114+
<TelerikLoader Size="@ThemeConstants.Loader.Size.Large" Type="@LoaderType.ConvergingSpinner" ThemeColor="@ThemeConstants.Loader.ThemeColor.Tertiary" />
115115
</div>
116116
}
117117
<p>some other content</p>

components/loadercontainer/appearance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The `LoaderContainer` utilizes the [Loader]({%slug loader-overview%}) component
9696
9797
<TelerikLoaderContainer LoaderType="@LoaderType.InfiniteSpinner"
9898
LoaderPosition="@LoaderPosition.Start"
99-
Size="@LoaderSize.Small"
99+
Size="@ThemeConstants.Loader.Size.Small"
100100
ThemeColor="info">
101101
</TelerikLoaderContainer>
102102
````

components/loadercontainer/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The LoaderContainer provides the following features:
8787

8888
* `LoaderType` - `enum` - controls the shape of the loader indicator. Takes a member of the `Telerik.Blazor.Component.LoaderType` enum. See the [Appearance]({%slug loadercontainer-appearance%}) article for more information and examples.
8989

90-
* `Size` - `enum` - controls the size of the loader indicator. Takes a member of the `Telerik.Blazor.Component.LoaderSize` enum. See the [Appearance]({%slug loadercontainer-appearance%}) article for more information and examples.
90+
* `Size` - `string` - controls the size of the loader indicator. Use a static property from the `ThemeConstants.Loader.Size` class - `Size.Small`, `Size.Medium` (default) or `Size.Large`. See the [Appearance]({%slug loadercontainer-appearance%}) article for more information and examples.
9191

9292
* `LoaderPosition` - `enum` - configures the position of the loader indicator against the `Text` parameter. Takes a member of the `Telerik.Blazor.Components.LoaderPosition`. You can find more information and examples in the [Appearance]({%slug loadercontainer-appearance%}) article.
9393

@@ -138,7 +138,7 @@ The panel is the white rectangular area that surrounds the loader indicator and
138138
139139
<TelerikLoaderContainer Class="myLoaderContainer"
140140
Visible="@(GridData == null ? true: false)"
141-
Size="@LoaderSize.Large"
141+
Size="@ThemeConstants.Loader.Size.Large"
142142
Text="My custom loading text"
143143
ThemeColor="light">
144144
</TelerikLoaderContainer>

0 commit comments

Comments
 (0)