I am a beginner with Blazor and typically use JavaScript for this task, but Blazor uses C#. I am attempting to incorporate the functionality of using an HTML button to minimize my chat window. However, I am uncertain about how to approach this.
Currently, I have my HTML chatbox
<div class="chatbox-holder">
<div class="chatbox">
<div class="chatbox-top">
<div class="chatbox-avatar">
<img src="../NewFolder/avatar.png"/>
</div>
<div class="chat-partner-name">
<span class="status online"></span>
<a target="_blank">Joe</a>
</div>
<button class="minimize-window" @onclick(minimize)></button>
</div>
Here, I am defining the button class and using @onclick to initiate the minimized function.
My CSS is configuring the button size as follows:
.minimize-window {
height: 25px;
width: 25px;
}
Now, I have declared a Blazor component as a function here, but I am unsure about how to implement the C# code to handle minimizing the window. It seems like there may be some missing code needed.
@functions {
void minimize()
{
}
}