/** * NOTE: Please keep the properties in items menu types generic enough such that they could be used for any list. * Not just events or properties. Being generic means we could re-use it in more places and be consistent. * We should aim for items-menu as the defacto item list renderer at mixpanel. */ export interface Sections { /** Section's label. If not present, only a horizontal separator rule is shown */ label?: string; /** The items inside the section */ items?: Array; /** A spinny is shown inside the section if isLoading is true */ isLoading?: boolean; /** Number of items to show per section. If more items than showLimit a 'Show All' expander is shown */ showLimit?: number; /** To indicate what dataset the items come from */ datasetDisplayName?: string; } export interface SectionItem { /** Item's label. This should always be present */ label: string; /** A short blurb / description about item that is shown on another line */ subLabel: string; /** Theme styling for the label. Currently only 'strong' and default supported */ labelTheme?: string; /** svg-icon shown besides the label */ icon?: string; /** By default icon is shown on left, but user can specify right icon e.g BETA icon */ iconSide?: 'left' | 'right'; /** Can the item be selected. Item is greyed out if disabled */ isDisabled?: boolean; /** Marks the item as selected */ isSelected?: boolean; /** Should '>' caret be shown besides the item. Used to indicate sub items */ hasCaret?: boolean; /** * Also used to indicate sub items, but either item or sub items can be selected. * We should re-think this with design. Not the most intuitive UX experience */ hasPill?: boolean; /** Label of the pill e.g. 'Properties' or 'Typecast' */ pillLabel?: string; /** Whether the pill is disabled. */ isPillDisabled?: boolean; }