Initial commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
@* Usage: @await Html.PartialAsync("_PowderSwatch", (ColorHex: "#C0392B", Name: "Gloss Red", Size: (int?)null))
|
||||
Size: optional override in px (default 9). *@
|
||||
@model (string ColorHex, string Name, int? Size)
|
||||
@{
|
||||
var px = (Model.Size ?? 9).ToString();
|
||||
var hex = string.IsNullOrEmpty(Model.ColorHex) ? "#CCCCCC" : Model.ColorHex;
|
||||
}
|
||||
<span class="pcl-swatch"
|
||||
style="background:@hex;width:@(px)px;height:@(px)px;"
|
||||
title="@Model.Name"></span>
|
||||
Reference in New Issue
Block a user