Skip to content

Commit

Permalink
Merge results
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Jun 13, 2024
2 parents f8fd083 + 12fa67e commit d84aa5d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@

.bit-ctp-ico {
cursor: pointer;
padding-right: 0;
padding-left: spacing(1);
padding-inline-end: 0;
padding-inline-start: spacing(1);
color: $color-foreground-secondary;
}

Expand Down Expand Up @@ -102,8 +102,8 @@
}

.bit-ctp-ico {
padding-left: 0;
padding-right: spacing(1);
padding-inline-start: 0;
padding-inline-end: spacing(1);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div @ref="RootElement" @attributes="HtmlAttributes"
id="@_Id"
style="@StyleBuilder.Value"
class="@ClassBuilder.Value"
class="@ClassBuilder.Value"
dir="@Dir?.ToString().ToLower()">

@if (LabelTemplate is not null)
Expand Down Expand Up @@ -140,14 +140,18 @@
</button>
</div>
}
<button @onclick="CloseCallout"
type="button"
style="@Styles?.CloseButton"
class="bit-tpc-tbt bit-tpc-cbn @Classes?.CloseButton"
title="@CloseButtonTitle"
aria-label="@CloseButtonTitle">
<i style="@Styles?.CloseButtonIcon" class="bit-icon bit-icon--Cancel @Classes?.CloseButtonIcon" aria-hidden="true" />
</button>

@if (ShowCloseButton)
{
<button @onclick="CloseCallout"
type="button"
style="@Styles?.CloseButton"
class="bit-tpc-tbt bit-tpc-cbn @Classes?.CloseButton"
title="@CloseButtonTitle"
aria-label="@CloseButtonTitle">
<i style="@Styles?.CloseButtonIcon" class="bit-icon bit-icon--Cancel @Classes?.CloseButtonIcon" aria-hidden="true" />
</button>
}
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ public bool IsOpen
/// </summary>
[Parameter] public string? Placeholder { get; set; }

/// <summary>
/// Whether the BitTimePicker's close button should be shown or not.
/// </summary>
[Parameter] public bool ShowCloseButton { get; set; }

/// <summary>
/// Custom CSS styles for different parts of the BitTimePicker component.
/// </summary>
Expand All @@ -287,6 +292,7 @@ public bool IsOpen
[Parameter] public string? ValueFormat { get; set; }



[JSInvokable("CloseCallout")]
public void CloseCalloutBeforeAnotherCalloutIsOpened()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
<ExamplePreview>
<BitTimePicker Style="max-width: 175px"
IsResponsive="true"
ShowCloseButton="true"
AriaLabel="Select a time"
Placeholder="Select a time..." />
</ExamplePreview>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,13 @@ public partial class BitTimePickerDemo
Type = "string?",
DefaultValue = "null",
Description = "Custom CSS classes/styles for the close button icon of the BitTimePicker."
},
new()
{
Name = "ShowCloseButton",
Type = "bool",
DefaultValue = "false",
Description = "Whether the BitTimePicker's close button should be shown or not."
}
}
}
Expand Down Expand Up @@ -737,6 +744,7 @@ public class FormValidationTimePickerModel
private readonly string example14RazorCode = @"
<BitTimePicker Style=""max-width: 175px""
IsResponsive=""true""
ShowCloseButton=""true""
AriaLabel=""Select a time""
Placeholder=""Select a time..."" />";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,7 @@ private static void SetupBlazorWebView()
settings.BlockNetworkLoads = settings.BlockNetworkImage = false;
#endif
});

AppContext.SetSwitch("BlazorWebView.AndroidFireAndForgetAsync", isEnabled: true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ private static void SetupBlazorWebView()
settings.BlockNetworkLoads = settings.BlockNetworkImage = false;
#endif
});

AppContext.SetSwitch("BlazorWebView.AndroidFireAndForgetAsync", isEnabled: true);
}

#if IOS || MACCATALYST
Expand Down

0 comments on commit d84aa5d

Please sign in to comment.