EUIfy PanelOptionsMenuForm. (#21375)

This commit is contained in:
CJ Cenizal 2018-07-30 14:41:13 -07:00 committed by GitHub
parent f0140850db
commit 8399f8b5d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,12 +20,11 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
KuiButton,
} from '@kbn/ui-framework/components';
import {
keyCodes,
EuiButtonEmpty,
EuiFormRow,
EuiFieldText,
} from '@elastic/eui';
export function PanelOptionsMenuForm({ title, onReset, onUpdatePanelTitle, onClose }) {
@ -41,28 +40,30 @@ export function PanelOptionsMenuForm({ title, onReset, onUpdatePanelTitle, onClo
return (
<div
className="kuiVerticalRhythm dashboardPanelMenuOptionsForm"
className="dashboardPanelMenuOptionsForm"
data-test-subj="dashboardPanelTitleInputMenuItem"
>
<label className="kuiFormLabel" htmlFor="panelTitleInput">Panel title</label>
<input
id="panelTitleInput"
data-test-subj="customDashboardPanelTitleInput"
name="min"
type="text"
className="kuiTextInput"
value={title}
onChange={onInputChange}
onKeyDown={onKeyDown}
aria-label="Changes to this input are applied immediately. Press enter to exit."
/>
<KuiButton
buttonType="hollow"
<EuiFormRow
label="Panel title"
>
<EuiFieldText
id="panelTitleInput"
data-test-subj="customDashboardPanelTitleInput"
name="min"
type="text"
value={title}
onChange={onInputChange}
onKeyDown={onKeyDown}
aria-label="Changes to this input are applied immediately. Press enter to exit."
/>
</EuiFormRow>
<EuiButtonEmpty
data-test-subj="resetCustomDashboardPanelTitle"
onClick={onReset}
>
Reset title
</KuiButton>
</EuiButtonEmpty>
</div>
);
}