Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated EuiForm examples #4734

Merged
merged 2 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src-docs/src/views/accordion/accordion_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from '../../../../src/components';

const repeatableForm = (
<EuiForm>
<EuiForm component="form">
<EuiFlexGroup>
<EuiFlexItem>
<EuiFormRow label="Username">
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/flyout/flyout_complicated.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default () => {
</p>
</EuiPopover>
<EuiSpacer size="m" />
<EuiForm>
<EuiForm component="form">
<EuiFormRow label="A SuperSelect field">
<EuiSuperSelect
options={superSelectOptions}
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/flyout/flyout_max_width.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default () => {

<EuiSpacer />

<EuiForm>
<EuiForm component="form">
<EuiFormRow
label="Text field"
helpText="I am some friendly help text.">
Expand Down
5 changes: 1 addition & 4 deletions src-docs/src/views/form_layouts/described_form_group.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default () => {
};

return (
<EuiForm>
<EuiForm component="form">
<EuiDescribedFormGroup
title={<h3>Single text field</h3>}
description={
Expand All @@ -38,13 +38,11 @@ export default () => {
<EuiFieldText name="first" aria-label="Example" />
</EuiFormRow>
</EuiDescribedFormGroup>

<EuiDescribedFormGroup title={<h3>No description</h3>}>
<EuiFormRow label="Text field">
<EuiFieldText name="first" />
</EuiFormRow>
</EuiDescribedFormGroup>

<EuiDescribedFormGroup
title={<h3>Multiple fields</h3>}
description="Here are three form rows. The first form row does not have a title.">
Expand All @@ -70,7 +68,6 @@ export default () => {
<EuiRange min={0} max={100} name="range" id="range" />
</EuiFormRow>
</EuiDescribedFormGroup>

<EuiDescribedFormGroup
title={<h2>Full width</h2>}
titleSize="xxxs"
Expand Down
4 changes: 2 additions & 2 deletions src-docs/src/views/form_layouts/inline_popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default () => {
);

const formSample = (
<EuiForm>
<EuiForm component="form">
<EuiFlexGroup>
<EuiFlexItem grow={false} style={{ width: 100 }}>
<EuiFormRow label="Age">
Expand Down Expand Up @@ -84,7 +84,7 @@ export default () => {
);

const formSample2 = (
<EuiForm>
<EuiForm component="form">
<EuiFormRow>
<EuiSwitch
id={htmlIdGenerator()()}
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/form_validation/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default () => {

return (
<Fragment>
<EuiForm isInvalid={showErrors} error={errors}>
<EuiForm isInvalid={showErrors} error={errors} component="form">
<EuiFormRow label="Validation only" isInvalid={showErrors}>
<EuiFieldText name="first" isInvalid={showErrors} />
</EuiFormRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const chartDemoPlugin = {

<EuiModalBody>
<>
<EuiForm>
<EuiForm component="form">
<EuiFlexGroup gutterSize="m" style={{ width: 600 }}>
<EuiFlexItem>
<EuiFormRow label="Palette">
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/modal/modal_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const modalFormSnippet = `<EuiModal onClose={closeModal}>
</EuiModalHeader>

<EuiModalBody>
<EuiForm id={formId}><!-- Modal body --></EuiForm>
<EuiForm id={formId} component="form"><!-- Modal body --></EuiForm>
</EuiModalBody>

<EuiModalFooter>
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/modal/modal_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default () => {
];

const formSample = (
<EuiForm id="modalFormId">
<EuiForm id="modalFormId" component="form">
<EuiFormRow>
<EuiSwitch
id={htmlIdGenerator()()}
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tour/managed.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default () => {
Start or reset tour
</EuiButtonEmpty>
<EuiSpacer />
<EuiForm>
<EuiForm component="form">
<EuiFormRow label="Enter an ES SQL query">
<EuiTourStep {...euiTourStepOne}>
<EuiTextArea
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tour/managed_hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default () => {
Reset tour
</EuiButtonEmpty>
<EuiSpacer />
<EuiForm>
<EuiForm component="form">
<EuiFormRow label="Enter an ES SQL query">
<EuiTourStep {...euiTourStepOne}>
<EuiTextArea
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tour/tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default () => {
Reset tour
</EuiButtonEmpty>
<EuiSpacer />
<EuiForm>
<EuiForm component="form">
<EuiFormRow label="Enter an ES SQL query">
<EuiTourStep
content={demoTourSteps[0].content}
Expand Down