-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ac71d6
commit 5941841
Showing
6 changed files
with
69 additions
and
58 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
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,18 +1,17 @@ | ||
@inherits PureComponent | ||
<label for="@For" class="@ApplyStyle("font-bold text-sm font-gray-900") @AccessibilityStyles">@ChildContent</label> | ||
<label for="@For" class="@ApplyStyle($"{Css.Base} {Css.Size(Size)}")">@ChildContent</label> | ||
|
||
@code { | ||
|
||
// required styles for accessibility, not overridable | ||
// touch target should be at least 24px | ||
// make it the same here since this field is often combined with <PureLink> | ||
// https://www.w3.org/WAI/WCAG21/Understanding/touch-target-size.html | ||
private string AccessibilityStyles => "inline-block leading-7"; | ||
|
||
/// <summary> | ||
/// The ID of the content that this label is associated with. | ||
/// </summary> | ||
[Parameter] | ||
public string? For { get; set; } | ||
|
||
/// <summary> | ||
/// The relative size of the label. | ||
/// </summary> | ||
[Parameter] | ||
public PureSize Size { get; set; } = PureSize.Medium; | ||
|
||
} |
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