Skip to content

Commit

Permalink
feat(gui): mount ts instead dist/icon.css
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Jan 12, 2024
1 parent f640810 commit c813b1f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
5 changes: 5 additions & 0 deletions editor/core/app.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<script setup lang="ts">
import { mountCssVarsRootStyle } from '@advjs/gui/client/styles/icons'
import { appName } from '~/constants'
useHead({
title: appName,
})
onMounted(() => {
mountCssVarsRootStyle()
})
</script>

<template>
Expand Down
1 change: 0 additions & 1 deletion editor/core/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export default defineNuxtConfig({
css: [
'@unocss/reset/tailwind.css',
'~/styles/index.scss',
'@advjs/gui/dist/icons.css',
],

colorMode: {
Expand Down
20 changes: 18 additions & 2 deletions packages/gui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,28 @@ GUI for ADV.JS Engine.
## Usage

```ts
// icons css vars
import '@advjs/gui/dist/icons.css'
// common css
import '@advjs/gui/client/styles/index.scss'
```

### Import Icon CSS

```ts
import '@advjs/gui/dist/icons.css'
// or
```

Or you also can import icons by TypeScript:

```ts
import { mountCssVarsRootStyle } from '@advjs/gui/client'
import { onMounted } from 'vue'

onMounted(() => {
mountCssVarsRootStyle()
})
```

### Nuxt

```ts
Expand Down
1 change: 1 addition & 0 deletions packages/gui/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createAGUI } from './utils'

export * from './styles/icons'
export * from './types'
export * from './components'
export * from './composables'
Expand Down

2 comments on commit c813b1f

@vercel
Copy link

@vercel vercel bot commented on c813b1f Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on c813b1f Jan 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.