-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathindex.ts
More file actions
32 lines (29 loc) · 1.09 KB
/
index.ts
File metadata and controls
32 lines (29 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import with_styled_components from "./react-styled-component-widget";
import with_inline_css from "./react-inline-css-widget";
import with_css_module from "./react-css-module-widget";
import type { JsxWidget } from "@web-builder/core";
import type {
ReactComponentExportingCofnig,
ReactStyledComponentsConfig,
ReactInlineCssConfig,
ReactCssModuleConfig,
ReactStylingStrategy,
} from "@grida/builder-config/framework-react";
import type { ReactComponentExportResult } from "@web-builder/react-core";
const finilize = {
with_styled_components:
with_styled_components as BuilderFunc<ReactStyledComponentsConfig>,
with_inline_css: with_inline_css as BuilderFunc<ReactInlineCssConfig>,
with_css_module: with_css_module as BuilderFunc<ReactCssModuleConfig>,
};
type BuilderFunc<S extends ReactStylingStrategy = ReactStylingStrategy> = (
entry: JsxWidget,
config: {
styling: S;
exporting: ReactComponentExportingCofnig;
}
) => ReactComponentExportResult;
export default finilize;
export type { BuilderFunc };
export * from "./widgets-native";
export * from "./widgets-reflect-react";