mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
EUIfy PanelOptionsMenuForm. (#21375)
This commit is contained in:
parent
f0140850db
commit
8399f8b5d7
1 changed files with 21 additions and 20 deletions
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue