-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄: Update Tag colour to match changes
- In [version 5](alphagov/govuk-design-system-backlog#62 (comment)) of the GDS front-end packages, they have changed the tag colours. As a result, our "dark blue" tag no longer existed, so all of our tags were using the default colours. - Changed tag colour match changes. :zap: Changed GetSectionSubmissionStatuses to return List - Improves performance by not having to call `.ToList` on an object that is already a List
- Loading branch information
1 parent
a01f7a3
commit dba7d5b
Showing
5 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
namespace Dfe.PlanTech.Web.TagHelpers.TaskList; | ||
|
||
public enum TagColour | ||
public static class TagColour | ||
{ | ||
Default, | ||
Blue, | ||
Grey, | ||
Red, | ||
DarkBlue, | ||
public readonly static string Default = "blue"; | ||
public readonly static string Blue = "blue"; | ||
public readonly static string Grey = "grey"; | ||
public readonly static string LightBlue = "light-blue"; | ||
public readonly static string Red = "red"; | ||
|
||
private readonly static string[] _colours = [Blue, Grey, LightBlue, Red]; | ||
|
||
public static string GetMatchingColour(string? toMatch) => string.IsNullOrEmpty(toMatch) ? Default : _colours.FirstOrDefault(colour => colour == toMatch, Default); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters