-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathindex.ts
More file actions
25 lines (22 loc) · 806 Bytes
/
index.ts
File metadata and controls
25 lines (22 loc) · 806 Bytes
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
import { JsxWidget } from "@web-builder/core";
import { ReactComponentExportResult } from "@web-builder/react-core";
import { react as react_config } from "@grida/builder-config";
import {
ReactCssModuleBuilder,
ReactCssModuleWidgetModuleExportable,
} from "./react-css-module-module-builder";
interface Config {
styling: react_config.ReactCssModuleConfig;
exporting: react_config.ReactComponentExportingCofnig;
}
/**
* css-module pattern with
*/
export default function finalizeReactWidget_CssModule(
entry: JsxWidget,
{ styling, exporting }: Config
): ReactComponentExportResult {
const builder = new ReactCssModuleBuilder({ entry, config: styling });
return builder.asExportableModule().finalize(exporting);
}
export { ReactCssModuleBuilder, ReactCssModuleWidgetModuleExportable };