I have dropdown control.I would like to know how to add custom icon in dropdown.please check the attached file for your reference.
please help
@using Syncfusion.Blazor.SplitButtons
<SfDropDownButton Content="@CONTENT">
<DropDownMenuItems>
<DropDownMenuItem Text="Open" IconCss=@OPEN></DropDownMenuItem>
<DropDownMenuItem Text="In Progress" IconCss=@PROGRESS></DropDownMenuItem>
<DropDownMenuItem Text="In Review" IconCss=@REVIEW></DropDownMenuItem>
<DropDownMenuItem Text="To Be Tested" IconCss=@TEST></DropDownMenuItem>
</DropDownMenuItems>
</SfDropDownButton>
@code {
const string CONTENT = "Activity";
const string OPEN = "e-icons e-open";
const string PROGRESS = "e-icons e-progress";
const string REVIEW = "e-icons e-review";
const string TEST = "e-icons e-test";
}
<style>
.e-open::before {
content: "\e7a0";
color:greenyellow;
}
.e-progress::before {
content: "\e7a0";
color:cornflowerblue;
}
.e-review::before {
content: "\e7a0";
color:cadetblue;
}
.e-test::before {
content: "\e7a0";
color:coral;
}
</style>
|
|
Great support..
Thanks.........
but this not working in material theme
<link rel='nofollow' href="https://cdn.syncfusion.com/blazor/19.2.49/styles/material.css" rel="stylesheet" />
please advise the same..
@using Syncfusion.Blazor.SplitButtons
<SfDropDownButton Content="@CONTENT">
<DropDownMenuItems>
<DropDownMenuItem Text="Open" IconCss=@OPEN></DropDownMenuItem>
<DropDownMenuItem Text="In Review" IconCss=@REVIEW></DropDownMenuItem>
<DropDownMenuItem Text="To Be Tested" IconCss=@TEST></DropDownMenuItem>
</DropDownMenuItems>
</SfDropDownButton>
@code {
const string CONTENT = "Activity";
const string OPEN = "e-icons e-open";
const string PROGRESS = "e-icons e-progress";
const string REVIEW = "e-icons e-review";
const string TEST = "e-icons e-test";
}
<style>
.e-open::before {
content: "\e671";
color: greenyellow;
background-color: greenyellow;
border-radius: 8px;
}
.e-progress::before {
color: cornflowerblue;
content: "\e671";
background-color: cornflowerblue;
border-radius: 8px;
}
.e-review::before {
color: cadetblue;
content: "\e671";
background-color: cadetblue;
border-radius: 8px;
}
.e-test::before {
content: "\e671";
background-color: coral;
border-radius: 8px;
color: coral;
}
</style>
|