Skip to content

Commit 34759b6

Browse files
committed
refactor: 增加样式支持
1 parent ca082ad commit 34759b6

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/components/BootstrapBlazor.CherryMarkdown/Components/CherryMarkdown/CherryMarkdown.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
{
77
<BootstrapLabel required="@Required" for="@Id" ShowLabelTooltip="ShowLabelTooltip" Value="@DisplayText" />
88
}
9-
<div @attributes="@AdditionalAttributes" id="@Id"></div>
9+
<div @attributes="@AdditionalAttributes" id="@Id" class="@ClassString"></div>

src/components/BootstrapBlazor.CherryMarkdown/Components/CherryMarkdown/CherryMarkdown.razor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ public partial class CherryMarkdown
6262
[Parameter]
6363
public string? Language { get; set; }
6464

65+
private string? ClassString => CssBuilder.Default("bb-cherry-markdown")
66+
.AddClass(CssClass)
67+
.AddClass(ValidCss)
68+
.Build();
69+
6570
/// <summary>
6671
/// <inheritdoc/>
6772
/// </summary>

0 commit comments

Comments
 (0)