Skip to content

Commit 7223519

Browse files
authored
feat(PdfReader): add ShowToolbar parameter (#741)
* feat(PdfReader): add ShowToolbar parameter * chore: bump version 10.0.4-beta02
1 parent 993e6bb commit 7223519

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/components/BootstrapBlazor.PdfReader/BootstrapBlazor.PdfReader.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>10.0.4-beta01</Version>
4+
<Version>10.0.4-beta02</Version>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/components/BootstrapBlazor.PdfReader/PdfReader.razor

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
@inherits BootstrapModuleComponentBase
44

55
<div @attributes="@AdditionalAttributes" id="@Id" class="@ClassString" style="@StyleString">
6-
@if (ShowToolbar)
7-
{
8-
<div class="bb-view-toolbar">
6+
<div class="bb-view-toolbar">
7+
@if (ShowToolbar)
8+
{
99
<div class="bb-view-title">
1010
@if (EnableThumbnails)
1111
{
@@ -79,8 +79,8 @@
7979
</div>
8080
</div>
8181
</div>
82-
</div>
83-
}
82+
}
83+
</div>
8484
<div class="bb-view-main">
8585
@if (EnableThumbnails)
8686
{

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public partial class PdfReader
131131

132132
private string? StyleString => CssBuilder.Default()
133133
.AddClass($"--bb-pdf-view-height: {ViewHeight};", !string.IsNullOrEmpty(ViewHeight))
134+
.AddClass($"--bb-pdf-toolbar-height: 0;", !ShowToolbar)
134135
.AddClassFromAttributes(AdditionalAttributes)
135136
.Build();
136137

0 commit comments

Comments
 (0)