Skip to content

Commit

Permalink
Exporting the mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
josechirivella committed Jan 25, 2024
1 parent 32be367 commit 7389963
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export * from "./renderer";
export * as Currencies from "../currency.json";
export * from "./utils";
export * from "./editor";
export * from "../mixins";

/**
* Gets the screen parent or null if don't have
Expand Down
25 changes: 19 additions & 6 deletions src/mixins/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
export { default as HasColorProperty } from './HasColorProperty';
export { default as shouldElementBeVisible } from './shouldElementBeVisible';
export { default as getValidPath } from './getValidPath';
export { default as formWatchers } from './formWatchers';
export { default as multiselectApi } from './multiselectApi';
export { default as defaultValues } from './defaultValues';
import { camelCase, upperFirst } from "lodash";

const mixins = [];
const modules = import.meta.globEager("./**/*.js");

Object.entries(modules).forEach(([path, m]) => {
const mixingName = upperFirst(
camelCase(
path
.split("/")
.pop()
.replace(/\.\w+$/, "")
)
);

mixins.push(m.default);
});

export default mixins;

0 comments on commit 7389963

Please sign in to comment.