編集

次の方法で共有


IContributedButton interface

Defines a button from a first- or third- party contribution

Properties

command

The id of a command contribution to execute when the button is clicked

commandArguments

Optional arugments to pass when invoking the supplied command

contributionId

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

disabled

If true, the button cannot be interacted with.

href

Href to navigate to when the button is clicked. Pass in if this is a link button.

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.

primary

Set to true if this button should be styled with a primary color.

target

Optional,context in which the linked resource will open.

text

Text to render inside the button.

tooltip

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

Property Details

command

The id of a command contribution to execute when the button is clicked

command?: string

Property Value

string

commandArguments

Optional arugments to pass when invoking the supplied command

commandArguments?: any[]

Property Value

any[]

contributionId

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

contributionId?: string

Property Value

string

disabled

If true, the button cannot be interacted with.

disabled?: boolean

Property Value

boolean

href

Href to navigate to when the button is clicked. Pass in if this is a link button.

href?: 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

primary

Set to true if this button should be styled with a primary color.

primary?: boolean

Property Value

boolean

target

Optional,context in which the linked resource will open.

target?: string

Property Value

string

text

Text to render inside the button.

text?: string

Property Value

string

tooltip

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

tooltip?: string

Property Value

string