編輯

共用方式為


IContributedPill interface

Defines a pill from a contribution

Properties

color

Background color for the pill Ignored unless variant is set to Colored If variant is set to Colored and this is not provided, we'll render as Standard and emit a warning to the console

contributionId

Id of the contribution that the button was defined in (optional, used to resolve relative icon URLs)

icon

Either a url (relative or fully qualified) or an IContributedIconDefinition with urls for light and dark themes. This allows the caller to use different styles of icons based on the theme type.

onClick

onClick handler for the pill itself

onRemoveClick

Renders the remove button if provided Handler to remove the pill

text

The text to render inside the pill.

tooltip

Optional value to use as an aria-label and tooltip for the pill.

Property Details

color

Background color for the pill Ignored unless variant is set to Colored If variant is set to Colored and this is not provided, we'll render as Standard and emit a warning to the console

color?: IColor

Property Value

contributionId

Id of the contribution that the button was defined in (optional, used to resolve relative icon URLs)

contributionId?: string

Property Value

string

icon

Either a url (relative or fully qualified) or an IContributedIconDefinition with urls for light and dark themes. This allows the caller to use different styles of icons based on the theme type.

icon?: string | IContributedIconDefinition

Property Value

onClick

onClick handler for the pill itself

onClick?: () => void

Property Value

() => void

onRemoveClick

Renders the remove button if provided Handler to remove the pill

onRemoveClick?: () => void

Property Value

() => void

text

The text to render inside the pill.

text: string

Property Value

string

tooltip

Optional value to use as an aria-label and tooltip for the pill.

tooltip?: string

Property Value

string