diff --git a/packages/@react-spectrum/s2/stories/Form.stories.tsx b/packages/@react-spectrum/s2/stories/Form.stories.tsx index 4d2e53e7a4a..2392c3c5b01 100644 --- a/packages/@react-spectrum/s2/stories/Form.stories.tsx +++ b/packages/@react-spectrum/s2/stories/Form.stories.tsx @@ -67,6 +67,12 @@ export const Example = (args: any) => ( + + Canada + United States + Mexico + Argentina + Soccer Baseball diff --git a/packages/react-aria-components/stories/Form.stories.tsx b/packages/react-aria-components/stories/Form.stories.tsx new file mode 100644 index 00000000000..6af26826533 --- /dev/null +++ b/packages/react-aria-components/stories/Form.stories.tsx @@ -0,0 +1,67 @@ +/* + * Copyright 2022 Adobe. All rights reserved. + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. You may obtain a copy + * of the License at http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS + * OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ + +import {action} from '@storybook/addon-actions'; +import {Button, Form, Input, Label, ListBox, ListBoxItem, Popover, Select, SelectValue, TextField} from 'react-aria-components'; +import React from 'react'; + +export default { + title: 'React Aria Components' +}; + + +export const FormAutoFillExample = () => { + return ( +
{ + action('onSubmit')(Object.fromEntries(new FormData(e.target as HTMLFormElement).entries())); + e.preventDefault(); + }}> + + + + + + + + + + + + + + + + + + +
+ ); +}; +