Skip to content

Commit 3451b45

Browse files
authored
fix(ui): update README.md for attributify and styles reset (#724)
1 parent e525ace commit 3451b45

File tree

3 files changed

+50
-33
lines changed

3 files changed

+50
-33
lines changed

packages/stage-ui/src/stores/providers.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import type {
1717
VoiceProviderWithExtraOptions,
1818
} from 'unspeech'
1919

20+
import type { AliyunRealtimeSpeechExtraOptions } from './providers/aliyun/stream-transcription'
21+
2022
import { isStageTamagotchi, isUrl } from '@proj-airi/stage-shared'
2123
import { computedAsync, useLocalStorage } from '@vueuse/core'
2224
import {
@@ -58,10 +60,9 @@ import {
5860
import { computed, ref, watch } from 'vue'
5961
import { useI18n } from 'vue-i18n'
6062

63+
import { createAliyunNLSProvider as createAliyunNlsStreamProvider } from './providers/aliyun/stream-transcription'
6164
import { models as elevenLabsModels } from './providers/elevenlabs/list-models'
6265
import { buildOpenAICompatibleProvider } from './providers/openai-compatible-builder'
63-
import type { AliyunRealtimeSpeechExtraOptions } from './providers/aliyun/stream-transcription'
64-
import { createAliyunNLSProvider as createAliyunNlsStreamProvider } from './providers/aliyun/stream-transcription'
6566

6667
const ALIYUN_NLS_REGIONS = [
6768
'cn-shanghai',

packages/ui/README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# @proj-airi/ui
22

3-
A stylized UI component library built with [Reka UI](https://reka-ui.com/).
3+
A stylized UI component library built with [Reka UI](https://reka-ui.com/) and [UnoCSS](https://unocss.dev/).
44

55
To preview the components, refer to the [`stage-ui`](../stage-ui) package for instructions for running the Histoire UI storyboard.
66

7-
## Usage
7+
## Get started
8+
9+
Install the library:
810

911
```shell
1012
ni @proj-airi/ui -D # from @antfu/ni, can be installed via `npm i -g @antfu/ni`
@@ -13,6 +15,33 @@ yarn i @proj-airi/ui -D
1315
npm i @proj-airi/ui -D
1416
```
1517

18+
This library requires `unocss` with Attributify Mode and a style reset.
19+
20+
First, install `unocss` if you haven't already:
21+
22+
```shell
23+
pnpm i -D unocss
24+
```
25+
26+
Next, in your `uno.config.ts`, add `presetAttributify()` to your presets array:
27+
```ts
28+
import { defineConfig, presetAttributify } from 'unocss'
29+
30+
export default defineConfig({
31+
presets: [
32+
presetAttributify(),
33+
// ...your other presets
34+
],
35+
})
36+
```
37+
38+
Finally, import the reset styles in your `main.ts`:
39+
```ts
40+
import '@unocss/reset/tailwind.css'
41+
```
42+
43+
## Usage
44+
1645
```vue
1746
<script setup lang="ts">
1847
import { Button } from '@proj-airi/ui'

0 commit comments

Comments
 (0)