mirror of
https://github.com/desktop/desktop
synced 2024-09-19 08:02:22 +00:00
Don't allow input error to be dismissed
This commit is contained in:
parent
54a4ebbf13
commit
cee75ab913
|
@ -1258,6 +1258,7 @@ export class CommitMessage extends React.Component<
|
|||
onClick={this.onSubmit}
|
||||
disabled={!buttonEnabled}
|
||||
tooltip={tooltip}
|
||||
tooltipDismissable={false}
|
||||
onlyShowTooltipWhenOverflowed={buttonEnabled}
|
||||
>
|
||||
<>
|
||||
|
|
|
@ -180,6 +180,15 @@ export interface IButtonProps {
|
|||
* Default: true
|
||||
* */
|
||||
readonly applyTooltipAriaDescribedBy?: boolean
|
||||
|
||||
/**
|
||||
* Whether or not the tooltip should be dismissable via the escape key. This
|
||||
* is generally true, but if the tooltip is communicating something important
|
||||
* to the user, such as an input error, it should not be dismissable.
|
||||
*
|
||||
* Defaults to true
|
||||
*/
|
||||
readonly tooltipDismissable?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -251,6 +260,7 @@ export class Button extends React.Component<IButtonProps, {}> {
|
|||
onlyWhenOverflowed={this.props.onlyShowTooltipWhenOverflowed}
|
||||
openOnTargetClick={this.props.openTooltipOnClick}
|
||||
applyAriaDescribedBy={this.props.applyTooltipAriaDescribedBy}
|
||||
dismissable={this.props.tooltipDismissable}
|
||||
>
|
||||
{tooltip}
|
||||
</Tooltip>
|
||||
|
|
|
@ -53,6 +53,15 @@ export interface ITooltipProps<T> {
|
|||
*/
|
||||
readonly interactive?: boolean
|
||||
|
||||
/**
|
||||
* Whether or not the tooltip should be dismissable via the escape key. This
|
||||
* is generally true, but if the tooltip is communicating something important
|
||||
* to the user, such as an input error, it should not be dismissable.
|
||||
*
|
||||
* Defaults to true
|
||||
*/
|
||||
readonly dismissable?: boolean
|
||||
|
||||
/**
|
||||
* The amount of time to wait (in milliseconds) while a user hovers over the
|
||||
* target before displaying the tooltip. There's typically no reason to
|
||||
|
|
Loading…
Reference in a new issue