MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / buttonClass

Function buttonClass

core/src/components/toast/toast.tsx:784–792  ·  view source on GitHub ↗
(button: ToastButton)

Source from the content-addressed store, hash-verified

782}
783
784const buttonClass = (button: ToastButton): CssClassMap => {
785 return {
786 'toast-button': true,
787 'toast-button-icon-only': button.icon !== undefined && button.text === undefined,
788 [`toast-button-${button.role}`]: button.role !== undefined,
789 'ion-focusable': true,
790 'ion-activatable': true,
791 };
792};
793
794const buttonPart = (button: ToastButton): string => {
795 return isCancel(button.role) ? 'button cancel' : 'button';

Callers 1

renderButtonsMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected