Skip to content

Commit

Permalink
Add Class and Style on Xterm element
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Mar 22, 2023
1 parent 49ac13e commit eb9a490
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion XtermBlazor/Xterm.razor
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div @ref="ElementReference"></div>
<div @ref="ElementReference" class="@Class" style="@Style"></div>
12 changes: 12 additions & 0 deletions XtermBlazor/Xterm.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ public partial class Xterm : ComponentBase, IAsyncDisposable
[Parameter]
public string[] AddonIds { get; set; } = Array.Empty<string>();

/// <summary>
/// User class names, separated by space.
/// </summary>
[Parameter]
public string Class { get; set; } = string.Empty;

/// <summary>
/// User styles, applied on top of the component's own classes and styles.
/// </summary>
[Parameter]
public string Style { get; set; } = string.Empty;

#region EventCallbacks
/// <summary>
/// Adds an event listener for when first rendered.
Expand Down
4 changes: 2 additions & 2 deletions XtermBlazor/XtermBlazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>Brings xterm.js to Blazor</Description>
<PackageIcon>icon.png</PackageIcon>
<Version>1.7.0</Version>
<Version>1.8.0</Version>
<PackageTags>xterm, xterm-js, blazor, blazor-server, blazor-webassembly, blazor-wasm, xtermblazor</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down Expand Up @@ -45,7 +45,7 @@

<ItemGroup>
<PackageReference Include="Macross.Json.Extensions" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.15" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit eb9a490

Please sign in to comment.