Skip to content

Commit

Permalink
v3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Peugnet committed Mar 30, 2024
1 parent 5a67894 commit 64821ae
Show file tree
Hide file tree
Showing 8 changed files with 298 additions and 252 deletions.
13 changes: 9 additions & 4 deletions Blazor-Color-Picker-Library/BlazorColorPicker.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<RootNamespace>BlazorColorPicker</RootNamespace>
<Authors>Christophe Peugnet</Authors>
<PackageIcon>icon.png</PackageIcon>
<Version>3.0.0</Version>
<Version>3.1.0</Version>
<Description>Opens a modal palette with the Material colors for Blazor Application</Description>
<PackageProjectUrl>https://github.com/tossnet/Blazor-Color-Picker</PackageProjectUrl>
<RepositoryUrl>https://github.com/tossnet/Blazor-Color-Picker</RepositoryUrl>
Expand All @@ -28,8 +28,13 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.1" />

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.17" />
</ItemGroup>


Expand Down
17 changes: 11 additions & 6 deletions Blazor-Color-Picker-Library/ColorPicker.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

<div class="color-picker-modal @CssClass"
tabindex="0" @onkeydown="@KeyDown" @ref="myPalette">
<div class="color-picker-content">
<div @ref="myPalette"
class="color-picker-modal @CssClass"
tabindex="0"
@onkeydown="@KeyDown" >
<div class="color-picker-content"
style="@Style">
@if (!string.IsNullOrEmpty(Title))
{
<div class="color-picker-header">
Expand All @@ -10,13 +13,15 @@
</div>
}
<div class="color-picker-body">
<div class="color-picker-palette" style="@CustomStyle">
<div class="color-picker-palette" style="@CustomStyle @Style">
@foreach (string item in colors)
{
<div class="color-picker-case text-center" style="background-color:@item" @onclick="() => ColorClick(item)">
<div class="color-picker-case text-center"
style="background-color:@item"
@onclick="() => ColorClick(item)">
@if (MyColor == item)
{
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 24 24"><path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" /></svg>
}
</div>
}
Expand Down
Loading

0 comments on commit 64821ae

Please sign in to comment.