vira
Version:
A simple and highly versatile design system using element-vir.
39 lines (38 loc) • 1.56 kB
TypeScript
import { type PartialWithUndefined } from '@augment-vir/common';
import { type ViraIconSvg } from '../../icons/icon-svg.js';
/**
* An element for an individual menu item.
*
* @category PopUp
* @category Elements
*/
export declare const ViraMenuItem: import("element-vir").DeclarativeElementDefinition<"vira-menu-item", PartialWithUndefined<{
selected: boolean;
disabled: boolean;
/**
* Set this to `true` to disable the default `ViraMenuItem` hover and active styles so you
* can apply your own.
*/
disablePointerStyles: boolean;
/**
* If provided, this will override the checkmark icon. If this is provided, the icon will
* _always_ be shown, even if `selected` is set to `false`.
*/
iconOverride: ViraIconSvg;
/**
* When `true`, activating this item will _not_ close the containing pop-up.
*
* @default false
*/
keepOpenAfterInteraction: boolean;
}>, {
/** Removes event listeners registered during init. */
cleanupListeners: undefined | (() => void);
}, {
/**
* Fired when this menu item is activated by the user (a non-disabled click). Pop-up
* containers (e.g. `ViraPopUpTrigger`) listen to this to close the pop-up on selection,
* gated by `keepOpenAfterInteraction`.
*/
activate: import("element-vir").DefineEvent<undefined>;
}, "vira-menu-item-selected" | "vira-menu-item-disabled" | "vira-menu-item-enabled" | "vira-menu-item-default-icon" | "vira-menu-item-default-styles", "vira-menu-item-icon-gap", readonly [], readonly []>;