-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathImageButton.razor
59 lines (56 loc) · 1.38 KB
/
ImageButton.razor
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@using BlazorStyled
<Styled @bind-Classname=ButtoncontainerStyle>
position: @Position;
left: @LeftStyle;
top: @TopStyle;
z-index: @ZIndex;
display: inline-block;
outline: none;
border: none;
width: @WidthStyle;
</Styled>
<Styled @bind-Classname=@ButtonStyle>
background-image: url('@ImageUrl');
background-size: 100% 100%;
display: inline-block;
justify-content: center;
align-items: center;
outline: none;
border: none;
background-repeat: no-repeat;
background-color: transparent;
width: @WidthStyle;
height: @HeightStyle;
white-space: nowrap;
font-size: @TextSizeStyle;
color: @TextColorName;
vertical-align: central;
</Styled>
<Styled @bind-Classname=@ButtontextalignStyle>
text-align: @ButtonTextAlign;
</Styled>
<style>
.imagebutton
{
cursor: default;
}
.imagebutton:focus
{
outline: none !important;
border: none !important;
}
.imagebutton:hover
{
outline: none;
border: none;
cursor: pointer !important;
}
</style>
@if (Visible)
{
<div class="@ButtoncontainerStyle">
<button class="imagebutton @ButtonStyle" @onclick="ButtonClicked" title="@Title">
<span class="@ButtonTextAlign">@ButtonText</span>
</button>
</div>
}