mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 05:55:00 +08:00
s/tooltip/tooltipContent/
This commit is contained in:
parent
c36c3a9b33
commit
860a9dbc82
@ -48,7 +48,7 @@ export default class Field extends React.PureComponent {
|
|||||||
onValidate: PropTypes.func,
|
onValidate: PropTypes.func,
|
||||||
// If specified, contents will appear as a tooltip on the element and
|
// If specified, contents will appear as a tooltip on the element and
|
||||||
// validation feedback tooltips will be suppressed.
|
// validation feedback tooltips will be suppressed.
|
||||||
tooltip: PropTypes.node,
|
tooltipContent: PropTypes.node,
|
||||||
// All other props pass through to the <input>.
|
// All other props pass through to the <input>.
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -137,8 +137,7 @@ export default class Field extends React.PureComponent {
|
|||||||
}, VALIDATION_THROTTLE_MS);
|
}, VALIDATION_THROTTLE_MS);
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { element, prefix, onValidate, children, ...inputProps } = this.props;
|
const { element, prefix, onValidate, children, tooltipContent, ...inputProps } = this.props;
|
||||||
delete inputProps.tooltip; // needs to be removed from props but we don't need it here
|
|
||||||
|
|
||||||
const inputElement = element || "input";
|
const inputElement = element || "input";
|
||||||
|
|
||||||
@ -170,11 +169,11 @@ export default class Field extends React.PureComponent {
|
|||||||
// Handle displaying feedback on validity
|
// Handle displaying feedback on validity
|
||||||
const Tooltip = sdk.getComponent("elements.Tooltip");
|
const Tooltip = sdk.getComponent("elements.Tooltip");
|
||||||
let fieldTooltip;
|
let fieldTooltip;
|
||||||
if (this.props.tooltip || this.state.feedback) {
|
if (tooltipContent || this.state.feedback) {
|
||||||
fieldTooltip = <Tooltip
|
fieldTooltip = <Tooltip
|
||||||
tooltipClassName="mx_Field_tooltip"
|
tooltipClassName="mx_Field_tooltip"
|
||||||
visible={this.state.feedbackVisible}
|
visible={this.state.feedbackVisible}
|
||||||
label={this.props.tooltip || this.state.feedback}
|
label={tooltipContent || this.state.feedback}
|
||||||
/>;
|
/>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ export default class SetIdServer extends React.Component {
|
|||||||
id="mx_SetIdServer_idServer"
|
id="mx_SetIdServer_idServer"
|
||||||
type="text" value={this.state.idServer} autoComplete="off"
|
type="text" value={this.state.idServer} autoComplete="off"
|
||||||
onChange={this._onIdentityServerChanged}
|
onChange={this._onIdentityServerChanged}
|
||||||
tooltip={this._getTooltip()}
|
tooltipContent={this._getTooltip()}
|
||||||
/>
|
/>
|
||||||
<input className="mx_Dialog_primary"
|
<input className="mx_Dialog_primary"
|
||||||
type="submit" value={_t("Change")}
|
type="submit" value={_t("Change")}
|
||||||
|
Loading…
Reference in New Issue
Block a user