Files
decePubClient/Components/Daisy/Mockup/DMockupBrowser.razor
T

30 lines
893 B
Plaintext
Raw Normal View History

@inherits DComponentBase
@* daisyUI Browser mockup: https://daisyui.com/components/mockup-browser/ . The toolbar shows Toolbar if given,
otherwise Url in an address bar (a div with the input class). *@
<div @attributes="AdditionalAttributes" class="@CssClass">
<div class="mockup-browser-toolbar">
@if (Toolbar is not null)
{
@Toolbar
}
else if (Url is not null)
{
<div class="input">@Url</div>
}
</div>
<div class="@ContentClass">
@ChildContent
</div>
</div>
@code {
[Parameter] public RenderFragment ChildContent { get; set; }
/// <summary>Text of the address bar.</summary>
[Parameter] public string Url { get; set; }
/// <summary>Custom toolbar content, in place of the address bar.</summary>
[Parameter] public RenderFragment Toolbar { get; set; }
[Parameter] public string ContentClass { get; set; }
string CssClass => Cx("mockup-browser", Class);
}