Skip to content

Commit

Permalink
Don't re-export PolarisAutoForm as PolarisAutoForm
Browse files Browse the repository at this point in the history
We already export the PolarisAutoForm component as AutoForm from the auto/polaris/index.ts file. We were accidentally also exporting it as PolarisAutoForm, which is a bit confusing for onlookers like the AI. Let's just export it once under a canonical name!

I also changed the skeleton to be explicitly exported as well using the existing naming convention.
  • Loading branch information
airhorns committed Sep 23, 2024
1 parent 57663d6 commit 4fd9d0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/auto/polaris/PolarisAutoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { PolarisAutoInput } from "./inputs/PolarisAutoInput.js";
import { PolarisAutoSubmit } from "./submit/PolarisAutoSubmit.js";
import { PolarisSubmitErrorBanner, PolarisSubmitSuccessfulBanner } from "./submit/PolarisSubmitResultBanner.js";

export const PolarisFormSkeleton = () => (
export const PolarisAutoFormSkeleton = () => (
<>
<SkeletonDisplayText size="medium" />
<SkeletonBodyText />
Expand Down Expand Up @@ -92,7 +92,7 @@ const PolarisAutoFormComponent = <
return (
<Form {...rest} onSubmit={submit}>
<FormLayout>
<PolarisFormSkeleton />
<PolarisAutoFormSkeleton />
</FormLayout>
</Form>
);
Expand Down
3 changes: 1 addition & 2 deletions packages/react/src/auto/polaris/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export { PolarisAutoButton as AutoButton } from "./PolarisAutoButton.js";
export * from "./PolarisAutoForm.js";
export { PolarisAutoForm as AutoForm } from "./PolarisAutoForm.js";
export { PolarisAutoForm as AutoForm, PolarisAutoFormSkeleton as AutoFormSkeleton } from "./PolarisAutoForm.js";
export { PolarisAutoTable as AutoTable } from "./PolarisAutoTable.js";
export { PolarisAutoBooleanInput as AutoBooleanInput } from "./inputs/PolarisAutoBooleanInput.js";
export { PolarisAutoDateTimePicker as AutoDateTimePicker } from "./inputs/PolarisAutoDateTimePicker.js";
Expand Down

0 comments on commit 4fd9d0d

Please sign in to comment.