Skip to content

Commit 8073e73

Browse files
docs(button): add reference example, fix icon namespace example
1 parent 4e2caf3 commit 8073e73

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

components/button/overview.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@ To add a Telerik Button to your Blazor app, use the `<TelerikButton>` tag:
3030
3131
![](images/basic-button.png)
3232

33+
>caption Component namespace and reference
34+
35+
````CSHTML
36+
@using Telerik.Blazor.Components.Button
37+
38+
<TelerikButton ref="@theButton" OnClick="@MyClick">Hello!</TelerikButton>
39+
40+
@functions{
41+
Telerik.Blazor.Components.Button.TelerikButton theButton;
42+
43+
void MyClick()
44+
{
45+
Console.WriteLine(theButton);
46+
}
47+
}
48+
````
49+
3350
## Click Handler
3451

3552
To attach a click handler, use the `OnClick` attribute and define the method in the `functions` section.
@@ -108,6 +125,7 @@ The following example shows how to use an image from a URL, a sprite image, and
108125
109126
````CSHTML
110127
@using Telerik.Blazor.Components.Button
128+
@using Telerik.Blazor
111129
112130
<TelerikButton SpriteClass="k-icon netherlandsFlag">Sprite</TelerikButton>
113131
<TelerikButton Icon="@IconName.Filter">Font Icon</TelerikButton>

0 commit comments

Comments
 (0)