Skip to content

Commit

Permalink
chore(package): πŸ”– bump version to 0.1.1 πŸš€
Browse files Browse the repository at this point in the history
refactor(for-component): 🧹 remove unnecessary exports and update imports πŸ”

fix(form): πŸ”§ correct form export to use form-parts module πŸ› οΈ
  • Loading branch information
Ryan-Zayne committed Jan 8, 2025
1 parent d472523 commit f46cfb2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zayne-labs/ui-react",
"type": "module",
"version": "0.1.0",
"version": "0.1.1",
"packageManager": "[email protected]",
"description": "A composable UI/UI-utilities components library. ",
"author": "Ryan Zayne",
Expand Down
4 changes: 0 additions & 4 deletions packages/react/src/components/common/for/for.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,3 @@ export function ForList<TArrayItem, TElement extends React.ElementType = "ul">(
</ListContainer>
);
}

export const Base = ForBase;

export const List = ForList;
12 changes: 6 additions & 6 deletions packages/react/src/components/common/for/getElementList.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import * as For from "./for";
import { ForBase, ForList } from "./for";

type GetElementListResult<TVariant extends "base" | "withWrapper"> = TVariant extends "base"
? [typeof For.Base]
: [typeof For.List];
? [typeof ForBase]
: [typeof ForList];

const getElementList = <TVariant extends "base" | "withWrapper" = "withWrapper">(
variant?: TVariant
): GetElementListResult<TVariant> => {
switch (variant) {
case "base": {
return [For.Base] as never;
return [ForBase] as never;
}
case "withWrapper": {
return [For.List] as never;
return [ForList] as never;
}
default: {
return [For.List] as never;
return [ForList] as never;
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/ui/form/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from "./form";

export * as Form from "./form";
export * as Form from "./form-parts";

export { useStrictFormItemContext as useFormItemContext } from "./form-context";

0 comments on commit f46cfb2

Please sign in to comment.