migrate ui library

This commit is contained in:
Tsanie Lily 2023-03-29 18:25:05 +08:00
parent 7c271d9b67
commit ad8fe8fa85
11 changed files with 15 additions and 15 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
desktop.ini

View File

@ -15,7 +15,7 @@
</a>
<div class="card">
<div id="create-icon" class="app-module">
<div title="Edit Contact">
<div>
<svg data-type="fa-solid" data-id="user-edit"></svg>
</div>
</div>

View File

@ -1,12 +0,0 @@
import { createIcon, resolveIcon } from "./icon"
import { createCheckbox, resolveCheckbox } from "./checkbox"
import { setTooltip, resolveTooltip } from "./tooltip"
export {
createIcon,
resolveIcon,
createCheckbox,
resolveCheckbox,
setTooltip,
resolveTooltip
}

12
lib/ui.js Normal file
View File

@ -0,0 +1,12 @@
import { createIcon, resolveIcon } from "./ui/icon"
import { createCheckbox, resolveCheckbox } from "./ui/checkbox"
import { setTooltip, resolveTooltip } from "./ui/tooltip"
export {
createIcon,
resolveIcon,
createCheckbox,
resolveCheckbox,
setTooltip,
resolveTooltip
}

View File

View File

@ -1,8 +1,7 @@
import './css/ui.min.css'
import './style.css'
import javascriptLogo from './javascript.svg'
import { resolveCheckbox, resolveIcon } from './lib/main.js'
import { resolveTooltip } from './lib/tooltip'
import { resolveCheckbox, resolveIcon, resolveTooltip } from './lib/ui'
document.querySelector('#js-logo').src = javascriptLogo