mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
feat(select-option): pass class from the option to the interface for individual styling (#21304)
Co-authored-by: Robb Wright <audaxion@gmail.com>
This commit is contained in:
@ -4,5 +4,6 @@ export interface SelectPopoverOption {
|
||||
value: string;
|
||||
disabled: boolean;
|
||||
checked: boolean;
|
||||
cssClass?: string | string[];
|
||||
handler?: () => void;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ import { Component, ComponentInterface, Host, Listen, Prop, h } from '@stencil/c
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
import { SelectPopoverOption } from '../../interface';
|
||||
import { safeCall } from '../../utils/overlays';
|
||||
import { getClassMap } from '../../utils/theme';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -51,7 +52,7 @@ export class SelectPopover implements ComponentInterface {
|
||||
}
|
||||
<ion-radio-group value={checkedValue}>
|
||||
{this.options.map(option =>
|
||||
<ion-item>
|
||||
<ion-item class={getClassMap(option.cssClass)}>
|
||||
<ion-label>
|
||||
{option.text}
|
||||
</ion-label>
|
||||
|
Reference in New Issue
Block a user