Skip to content

Commit

Permalink
chore: add React module
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoruaFox committed Feb 20, 2024
1 parent b89997f commit 53dc8db
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/InPageEdit/React/React.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/* eslint-disable unicorn/no-empty-file */
// 如果使用 jsx-dom,则取消注释以下行 / To Use jsx-dom, uncomment the following line
// export * from 'jsx-dom';
3 changes: 3 additions & 0 deletions src/InPageEdit/React/definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"enable": false
}
4 changes: 4 additions & 0 deletions src/InPageEdit/React/modules/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module 'ext.gadget.React' {
// 如果使用 jsx-dom,则取消注释以下行 / To Use jsx-dom, uncomment the following line
// export * from 'jsx-dom';
}
25 changes: 25 additions & 0 deletions src/InPageEdit/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* @summary For import styles in TypeScript
*/
declare module '*.css';
declare module '*.less';
declare module '*.module.css' {
const classes: {[key: string]: string};
export default classes;
}

declare module '*.module.less' {
const classes: {[key: string]: string};
export default classes;
}

/**
* @summary Do not forget to declare these file extensions in `scripts/build-esbuild_options.ts`
* @see {@link https://esbuild.github.io/api/#loader}
*/
declare module '*.gif';
declare module '*.ico';
declare module '*.jpg';
declare module '*.jpeg';
declare module '*.png';
declare module '*.svg';

0 comments on commit 53dc8db

Please sign in to comment.