chore: 使用 TS 重構部分 React 組件, 引入 Mdui 部分組件的類型定義
This commit is contained in:
@@ -2,8 +2,28 @@ import * as React from 'https://esm.sh/react@18.3.1'
|
||||
import * as ReactDOM from 'https://esm.sh/react-dom@18.3.1'
|
||||
import CryptoES from 'https://unpkg.com/crypto-es@3.0.4/dist/index.mjs'
|
||||
|
||||
import type { Dialog } from 'https://unpkg.com/mdui@2.1.4/components/dialog/index.d.ts'
|
||||
import type { TextField } from 'https://unpkg.com/mdui@2.1.4/components/text-field/index.d.ts'
|
||||
import type { Button } from 'https://unpkg.com/mdui@2.1.4/components/button/index.d.ts'
|
||||
import type { NavigationRail } from 'https://unpkg.com/mdui@2.1.4/components/navigation-rail/navigation-rail.d.ts'
|
||||
|
||||
declare global {
|
||||
namespace React {
|
||||
namespace JSX {
|
||||
interface IntrinsicAttributes {
|
||||
id?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
React,
|
||||
ReactDOM,
|
||||
CryptoES,
|
||||
|
||||
Dialog as MduiDialog,
|
||||
TextField as MduiTextField,
|
||||
Button as MduiButton,
|
||||
NavigationRail as MduiNavigationRail,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user