You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
643 B
28 lines
643 B
@page "/button"
|
|
@using Connected.Components;
|
|
@using Connected.Enums;
|
|
@using Connected.Models.Modal;
|
|
@using Connected.Models;
|
|
@using Connected.Services;
|
|
@using Connected.Utilities;
|
|
|
|
<h1 style="text-align:center;">BUTTON EXAMPLE</h1>
|
|
|
|
<Button OnClick="(()=>TextChange())">Change text default</Button>
|
|
|
|
<Button OnClick="(()=>TextChange(Hello))">Change text to - Hello my friend</Button>
|
|
|
|
<p>Text: <h4>@text</h4></p>
|
|
|
|
@code {
|
|
string text = "Some random text";
|
|
|
|
string Hello = "Hello my friend";
|
|
|
|
private void TextChange(string new_text="Some random text.. but new")
|
|
{
|
|
text = new_text;
|
|
StateHasChanged();
|
|
}
|
|
|
|
} |