Table of Contents

Class PopoverBuilder

Namespace
TwBlazor.Builders
Assembly
TwBlazor.dll

Builds the shared "box" classes (background, border, rounded corners, shadow) for every popover panel (date/time/color picker panels) from TwOverlayTheme. Mirrors GetSurfaceClasses(DialogMaxWidth?, bool, bool, Rounded?, Shadow?, string?)'s instance-override/theme-default/global-default resolution, so popovers and the modal dialog behave the same way instead of the popover family having no such override tier at all. Also builds tooltip classes, since a tooltip is a small popover.

public class PopoverBuilder
Inheritance
PopoverBuilder
Inherited Members

Constructors

PopoverBuilder(TwBlazorOptions, RoundedBuilder, ShadowBuilder)

Builds the shared "box" classes (background, border, rounded corners, shadow) for every popover panel (date/time/color picker panels) from TwOverlayTheme. Mirrors GetSurfaceClasses(DialogMaxWidth?, bool, bool, Rounded?, Shadow?, string?)'s instance-override/theme-default/global-default resolution, so popovers and the modal dialog behave the same way instead of the popover family having no such override tier at all. Also builds tooltip classes, since a tooltip is a small popover.

public PopoverBuilder(TwBlazorOptions options, RoundedBuilder roundedBuilder, ShadowBuilder shadowBuilder)

Parameters

options TwBlazorOptions
roundedBuilder RoundedBuilder
shadowBuilder ShadowBuilder

Methods

GetSurfaceClasses(Rounded?, Shadow?, string?)

Gets the classes for a popover panel's surface (background, border, rounded corners, shadow).

public string GetSurfaceClasses(Rounded? rounded, Shadow? shadow, string? customClass = null)

Parameters

rounded Rounded?

Instance-level rounded override.

shadow Shadow?

Instance-level shadow override.

customClass string

Additional custom classes to append.

Returns

string

Remarks

Full is capped at Lg, so a panel never turns into a pill.

GetTooltipArrowClasses(TooltipPlacement)

Gets the classes for a tooltip's arrow: the shared arrow shape, the popover fill and border so it continues the bubble's outline, and the offset for the bubble's placement.

public string GetTooltipArrowClasses(TooltipPlacement placement)

Parameters

placement TooltipPlacement

Which side of the control the bubble appears on.

Returns

string

GetTooltipClasses(bool, TooltipPlacement, Rounded?, Shadow?, string?)

Gets the classes for a tooltip bubble: the shared tooltip layout/visibility classes on top of the popover surface from GetSurfaceClasses(Rounded?, Shadow?, string?), so tooltips match popover panels.

public string GetTooltipClasses(bool dismissed, TooltipPlacement placement = TooltipPlacement.Top, Rounded? rounded = null, Shadow? shadow = null, string? customClass = null)

Parameters

dismissed bool

Whether the user has dismissed the tooltip (Escape), which hides it regardless of hover or focus until they leave the control.

placement TooltipPlacement

Which side of the control the bubble appears on.

rounded Rounded?

Instance-level rounded override.

shadow Shadow?

Instance-level shadow override.

customClass string

Additional custom classes to append to the bubble.

Returns

string

GetTooltipWrapperClasses()

Gets the classes for the element wrapping a control and its tooltip bubble.

public string GetTooltipWrapperClasses()

Returns

string