Skip to content

Commit

Permalink
style tweaks for purecard
Browse files Browse the repository at this point in the history
  • Loading branch information
codymullins committed Apr 2, 2024
1 parent 3841059 commit 26935fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions src/Pure.Blazor.Components/Display/PureCard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,27 @@

@if (Alignment == PureCardAlignment.Top)
{
<div class="rounded sm:rounded-sm md:rounded-xs overflow-hidden shadow-lg border border-solid border-neutral-200 bg-white dark:bg-gray-800 dark:border-transparent @Styles">
<div class="@ApplyStyle("rounded-md sm:rounded-sm overflow-hidden shadow-md border border-solid border-gray-200 bg-gray-50")">
@if (!string.IsNullOrWhiteSpace(ImageUrl))
{
<img src="@ImageUrl">
<img src="@ImageUrl" alt="@ImageAlt"/>
}


<div class="px-2 py-2.5">
@if (!string.IsNullOrWhiteSpace(Title))
{
<Header2>@Title</Header2>
}
<p class="text-base">
<div class="text-base">
@ChildContent
</p>
</div>
</div>
</div>
}
else
{
<div class="w-full shadow-lg rounded sm:rounded-sm md:rounded-xs border border-solid border-neutral-200 bg-white dark:bg-gray-800 dark:border-transparent @Styles">
<div class="@ApplyStyle("w-full shadow-md rounded-md sm:rounded-sm border border-solid border-gray-200 bg-gray-50")">
@if (!string.IsNullOrWhiteSpace(ImageUrl))
{
<div class="h-48 lg:h-auto lg:w-48 flex-none bg-cover text-center overflow-hidden" style="background-image: url('@ImageUrl')">
Expand All @@ -34,7 +36,7 @@ else
{
<Header2>@Title</Header2>
}
<p class="text-gray-800 text-base">@ChildContent</p>
<div class="text-gray-800 text-base">@ChildContent</div>
</div>
</div>
</div>
Expand All @@ -47,4 +49,5 @@ else
[Parameter] public PureCardAlignment Alignment { get; set; }

[Parameter] public string? ImageUrl { get; set; }
[Parameter] public string? ImageAlt { get; set; }
}
2 changes: 1 addition & 1 deletion src/Pure.Blazor.Components/Pure.Blazor.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<LangVersion>preview</LangVersion>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>PureBlazor Components</Title>
<Version>0.3.0</Version>
<Version>0.4.0</Version>
<PackageId>PureBlazor.Components</PackageId>
<Description>Blazor UI components for .NET Blazor with an optional headless mode.</Description>
<PackageProjectUrl>https://pureblazor.com</PackageProjectUrl>
Expand Down

0 comments on commit 26935fd

Please sign in to comment.