|
| 1 | +@attribute [Route(pageUrl)] |
| 2 | +@layout DemosMainLayout |
| 3 | + |
| 4 | +<PageMetaTags PageUrl="@pageUrl" Title="@metaTitle" Description="@metaDescription" ImageUrl="@imageUrl" /> |
| 5 | + |
| 6 | +<PageHero Title="@pageTitle"> |
| 7 | + <SubTitleTemplate> |
| 8 | + @((MarkupString)pageDescription) |
| 9 | + </SubTitleTemplate> |
| 10 | +</PageHero> |
| 11 | + |
| 12 | +<DocsLink Href="@RouteConstants.Docs_Form_EnumInput_Documentation" /> |
| 13 | + |
| 14 | +<Section Class="p-0" Size="HeadingSize.H3" Name="Example" PageUrl="@pageUrl" Link="example"> |
| 15 | + <Demo Type="typeof(EnumInput_Demo_01_How_it_works)" Tabs="true" /> |
| 16 | +</Section> |
| 17 | + |
| 18 | +<Section Class="p-0" Size="HeadingSize.H3" Name="Colors" PageUrl="@pageUrl" Link="colors"> |
| 19 | + <Block> |
| 20 | + You can use the <code>Color</code> parameter to set the color of the <code>EnumInput</code> component. |
| 21 | + The available colors are: <b>Link</b>, <b>Primary</b>, <b>Info</b>, <b>Success</b>, <b>Warning</b>, and <b>Danger</b>. |
| 22 | + </Block> |
| 23 | + <Demo Type="typeof(EnumInput_Demo_02_Colors)" Tabs="true" /> |
| 24 | +</Section> |
| 25 | + |
| 26 | +<Section Class="p-0" Size="HeadingSize.H3" Name="Sizes" PageUrl="@pageUrl" Link="Sizes"> |
| 27 | + <Block> |
| 28 | + You can use the <code>Size</code> parameter to set the size of the <code>EnumInput</code> component. |
| 29 | + The available sizes are: <b>Small</b>, <b>Normal</b>, <b>Medium</b>, and <b>Large</b>. |
| 30 | + </Block> |
| 31 | + <Demo Type="typeof(EnumInput_Demo_03_Sizes)" Tabs="true" /> |
| 32 | +</Section> |
| 33 | + |
| 34 | +<Section Class="p-0" Size="HeadingSize.H3" Name="Styles" PageUrl="@pageUrl" Link="styles"> |
| 35 | + <Block> |
| 36 | + You can create rounded <code>EnumInput</code> component by using the <code>IsRounded</code> parameter. |
| 37 | + In the example below, <code>IsRounded</code> parameter is set to <b>true</b>. |
| 38 | + </Block> |
| 39 | + <Demo Type="typeof(EnumInput_Demo_04_Styles)" Tabs="true" /> |
| 40 | +</Section> |
| 41 | + |
| 42 | +<Section Class="p-0" Size="HeadingSize.H3" Name="States" PageUrl="@pageUrl" Link="states"> |
| 43 | + <Demo Type="typeof(EnumInput_Demo_05_States)" Tabs="true" /> |
| 44 | +</Section> |
| 45 | + |
| 46 | +<Section Class="p-0" Size="HeadingSize.H3" Name="Disabled" PageUrl="@pageUrl" Link="disabled"> |
| 47 | + <Block> |
| 48 | + You can disable the <code>EnumInput</code> component by using the <code>Disabled</code> parameter. |
| 49 | + In the example below, <code>Disabled</code> parameter is set to <b>true</b>. |
| 50 | + </Block> |
| 51 | + <Demo Type="typeof(EnumInput_Demo_06_Disabled)" Tabs="true" /> |
| 52 | +</Section> |
| 53 | + |
| 54 | +<Section Class="p-0" Size="HeadingSize.H3" Name="Events" PageUrl="@pageUrl" Link="events"> |
| 55 | + <Block> |
| 56 | + The <code>EnumInput</code> component has two events: <code>ValueChanged</code> and <code>TextChanged</code>. |
| 57 | + </Block> |
| 58 | +</Section> |
| 59 | + |
| 60 | +<Section Class="p-0" Size="HeadingSize.H4" Name="ValueChanged" PageUrl="@pageUrl" Link="events-value-changed"> |
| 61 | + <Block> |
| 62 | + The <code>ValueChanged</code> event is triggered when the value of the <code>EnumInput</code> component changes. |
| 63 | + </Block> |
| 64 | + <Demo Type="typeof(EnumInput_Demo_07_Events_A_ValueChanged)" Tabs="true" /> |
| 65 | +</Section> |
| 66 | + |
| 67 | +<Section Class="p-0" Size="HeadingSize.H4" Name="TextChanged" PageUrl="@pageUrl" Link="events-text-changed"> |
| 68 | + <Block> |
| 69 | + The <code>TextChanged</code> event is triggered when the text of the <code>EnumInput</code> component changes. |
| 70 | + </Block> |
| 71 | + <Demo Type="typeof(EnumInput_Demo_07_Events_B_TextChanged)" Tabs="true" /> |
| 72 | +</Section> |
| 73 | + |
| 74 | +<Section Class="p-0" Size="HeadingSize.H3" Name="Mehods" PageUrl="@pageUrl" Link="methods"> |
| 75 | + <Block> |
| 76 | + The <code>EnumInput</code> component has two methods: <code>Enable()</code> and <code>Disable()</code>. |
| 77 | + You can use these methods to enable or disable the <code>EnumInput</code> component programmatically. |
| 78 | + </Block> |
| 79 | +</Section> |
| 80 | + |
| 81 | +<Section Class="p-0" Size="HeadingSize.H4" Name="Enable() and Disable()" PageUrl="@pageUrl" Link="methods-enable-disable"> |
| 82 | + <Demo Type="typeof(EnumInput_Demo_08_Methods_Enable_Disable)" Tabs="true" /> |
| 83 | +</Section> |
| 84 | + |
| 85 | +@code { |
| 86 | + private const string pageUrl = RouteConstants.Demos_Form_EnumInput_Documentation; |
| 87 | + private const string pageTitle = "EnumInput"; |
| 88 | + private const string pageDescription = "The <code>EnumInput</code> component is used to show enum values in a dropdown list. It is a simple and effective way to allow users to select from a predefined set of options."; |
| 89 | + private const string metaTitle = "Blazor EnumInput Component"; |
| 90 | + private const string metaDescription = "The EnumInput component is used to show enum values in a dropdown list. It is a simple and effective way to allow users to select from a predefined set of options."; |
| 91 | + private const string imageUrl = "https://i.imgur.com/FGgEMp6.jpg"; // TODO: update |
| 92 | +} |
0 commit comments