mirror of
https://github.com/coder/coder.git
synced 2026-09-22 13:10:21 +08:00
fix: remove @mui/material from formUtils.stories.tsx (#27503)
This pull-request removes the material dependency from
`formUtils.stories.tsx`. Just a lil bit of dead code we can clean up 🙂.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import TextField from "@mui/material/TextField";
|
||||
import type { Meta, StoryObj } from "@storybook/react-vite";
|
||||
import { useFormik } from "formik";
|
||||
import type { FC } from "react";
|
||||
import { action } from "storybook/actions";
|
||||
import { Form } from "#/components/Form/Form";
|
||||
import { FormField } from "#/components/FormField/FormField";
|
||||
import { getFormHelpers } from "./formUtils";
|
||||
|
||||
interface ExampleFormProps {
|
||||
@@ -22,13 +21,7 @@ const ExampleForm: FC<ExampleFormProps> = ({ value, maxLength }) => {
|
||||
const getFieldHelpers = getFormHelpers(form, null);
|
||||
|
||||
return (
|
||||
<Form>
|
||||
<TextField
|
||||
label="Value"
|
||||
rows={2}
|
||||
{...getFieldHelpers("value", { maxLength })}
|
||||
/>
|
||||
</Form>
|
||||
<FormField label="Value" field={getFieldHelpers("value", { maxLength })} />
|
||||
);
|
||||
};
|
||||
|
||||
@@ -38,7 +31,7 @@ const meta: Meta<typeof ExampleForm> = {
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof Form>;
|
||||
type Story = StoryObj<typeof ExampleForm>;
|
||||
|
||||
export const UnderMaxLength: Story = {
|
||||
args: {
|
||||
|
||||
Reference in New Issue
Block a user