diff --git a/samples/DotNetElements.CrudExample/Components/Pages/DiffViewerExample.razor b/samples/DotNetElements.CrudExample/Components/Pages/DiffViewerExample.razor
index 6a0f166..3413073 100644
--- a/samples/DotNetElements.CrudExample/Components/Pages/DiffViewerExample.razor
+++ b/samples/DotNetElements.CrudExample/Components/Pages/DiffViewerExample.razor
@@ -16,7 +16,7 @@
-
+
@@ -38,7 +38,7 @@
private SideBySideDiffModel? sideBySideDiff;
private string? textA =
-@"unchanged 1
+ @"unchanged 1
unchanged 2
Huhu 1
test abc test1 abc
@@ -46,7 +46,7 @@ deleted
here is a unchanged line";
private string? textB =
-@"unchanged 1
+ @"unchanged 1
unchanged 2
Huhu 2
blub abc test2 abc
diff --git a/src/DotNetElements.Web.Blazor/DiffViewer/CompactDiffViewer.razor b/src/DotNetElements.Web.Blazor/DiffViewer/CompactDiffViewer.razor
index 34ae6ca..f06b9ca 100644
--- a/src/DotNetElements.Web.Blazor/DiffViewer/CompactDiffViewer.razor
+++ b/src/DotNetElements.Web.Blazor/DiffViewer/CompactDiffViewer.razor
@@ -1,8 +1,10 @@
@using DotNetElements.Core.StringDiff
+@inherits MudComponentBase
+
@if (Diff?.HasDifferences is true)
{
-
+
@LabelOld → @LabelNew |
@@ -58,6 +60,6 @@ else
private string GetOldDiffLineBackground(DiffPiece diffLine)
{
- return diffLine.Type is ChangeType.Unchanged ? DnePalette.DiffLineUnchanged.ToString() : $"var({DnePalette.DiffLineOld})";
+ return diffLine.Type is ChangeType.Unchanged ? $"var({DnePalette.DiffLineUnchanged})" : $"var({DnePalette.DiffLineOld})";
}
}
diff --git a/src/DotNetElements.Web.Blazor/DiffViewer/SideBySideDiffViewer.razor b/src/DotNetElements.Web.Blazor/DiffViewer/SideBySideDiffViewer.razor
index fc22a4f..8a77803 100644
--- a/src/DotNetElements.Web.Blazor/DiffViewer/SideBySideDiffViewer.razor
+++ b/src/DotNetElements.Web.Blazor/DiffViewer/SideBySideDiffViewer.razor
@@ -1,8 +1,10 @@
@using DotNetElements.Core.StringDiff
+@inherits MudComponentBase
+
@if (Diff?.OldText.HasDifferences is true || Diff?.NewText.HasDifferences is true)
{
-