Skip to content

Commit af369d6

Browse files
committed
docs(Progress): improve
1 parent 4b72cf3 commit af369d6

File tree

8 files changed

+30
-21
lines changed

8 files changed

+30
-21
lines changed

docs/components/progress.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ Use the `v-model` directive to control the value of the Progress.
3636
</ClientOnly>
3737
</div>
3838

39-
::: details
4039
<<< @/examples/progress/demo/Progress.vue{8 vue:line-numbers}
41-
:::
4240

4341
### Max
4442

@@ -82,7 +80,7 @@ Use the `status` prop to display the current Progress value above the bar.
8280

8381
### Indeterminate
8482

85-
When no `v-model` is set or the value is `null`, the Progress becomes _indeterminate_. The progress bar is animated as a `carousel`, but you can change it using the [`animation`](#animation) prop.
83+
When no `v-model` is set or the value is `null`, the Progress becomes _indeterminate_. The progress bar is animated as a `loading`, but you can change it using the [`animation`](#animation) prop.
8684

8785
<div class="lg:min-h-[160px]">
8886
<ClientOnly>
@@ -96,7 +94,7 @@ When no `v-model` is set or the value is `null`, the Progress becomes _indetermi
9694

9795
### Animation
9896

99-
Use the `animation` prop to change the animation of the Progress to an inverse carousel, a swinging bar or an elastic bar. Defaults to `carousel`.
97+
Use the `animation` prop to change the animation of the Progress to an inverse carousel, a swinging bar or an elastic bar. Defaults to `loading`.
10098

10199
<div class="lg:min-h-[275px]">
102100
<ClientOnly>
@@ -105,7 +103,7 @@ Use the `animation` prop to change the animation of the Progress to an inverse c
105103
</div>
106104

107105
::: details
108-
<<< @/examples/progress/demo/Animation.vue{13 vue:line-numbers}
106+
<<< @/examples/progress/demo/Animation.vue{15 vue:line-numbers}
109107
:::
110108

111109
### Orientation
@@ -119,7 +117,7 @@ Use the `orientation` prop to change the orientation of the Progress. Defaults t
119117
</div>
120118

121119
::: details
122-
<<< @/examples/progress/demo/Orientation.vue{13 vue:line-numbers}
120+
<<< @/examples/progress/demo/Orientation.vue{15 vue:line-numbers}
123121
:::
124122

125123
### Color
@@ -133,7 +131,7 @@ Use the `color` prop to change the color of the Slider.
133131
</div>
134132

135133
::: details
136-
<<< @/examples/progress/demo/Color.vue{13 vue:line-numbers}
134+
<<< @/examples/progress/demo/Color.vue{15 vue:line-numbers}
137135
:::
138136

139137
### Size
@@ -147,7 +145,7 @@ Use the `size` prop to change the size of the Slider.
147145
</div>
148146

149147
::: details
150-
<<< @/examples/progress/demo/Size.vue{13 vue:line-numbers}
148+
<<< @/examples/progress/demo/Size.vue{15 vue:line-numbers}
151149
:::
152150

153151
### Inverted

docs/examples/progress/Animation.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ import Demo from './demo/Animation.vue'
66
77
const animations = Object.keys(theme.variants.animation)
88
9-
const animation = ref('swing' as const)
9+
const animation = ref('loading' as const)
1010
</script>
1111

1212
<template>
1313
<ComponentShowExample>
1414
<template #actions>
15-
<B24RadioGroup v-model="animation" legend="animation" :items="animations" orientation="horizontal" />
15+
<B24FormField label="animation" class="w-full sm:w-1/4">
16+
<B24Select v-model="animation" :items="animations" />
17+
</B24FormField>
1618
</template>
1719
<Demo :animation="animation" />
1820
</ComponentShowExample>

docs/examples/progress/Orientation.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ const orientation = ref('vertical' as const)
1313
<template #actions>
1414
<B24RadioGroup v-model="orientation" legend="orientations" :items="orientations" orientation="horizontal" />
1515
</template>
16-
<Demo :orientation="orientation" />
16+
<div class="h-48 w-full flex flex-col items-center justify-center">
17+
<Demo :orientation="orientation" />
18+
</div>
1719
</ComponentShowExample>
1820
</template>

docs/examples/progress/demo/Animation.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<script setup lang="ts">
2+
import type { ProgressProps } from '@bitrix24/b24ui-nuxt'
3+
24
export interface ExampleProps {
3-
animation?: any
5+
animation?: ProgressProps['animation']
46
}
57
68
withDefaults(defineProps<ExampleProps>(), {
7-
animation: 'swing'
9+
animation: 'swing' as const
810
})
911
</script>
1012

docs/examples/progress/demo/Color.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<script setup lang="ts">
2+
import type { ProgressProps } from '@bitrix24/b24ui-nuxt'
3+
24
export interface ExampleProps {
3-
color?: any
5+
color?: ProgressProps['color']
46
}
57
68
withDefaults(defineProps<ExampleProps>(), {
7-
color: 'default'
9+
color: 'default' as const
810
})
911
</script>
1012

docs/examples/progress/demo/MaxArray.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ const value = ref(3)
77
<template>
88
<B24Progress
99
v-model="value"
10-
:max="['Waiting...', 'Cloning...', 'Migrating...', 'Deploying...', 'Done!']"
10+
:max="['Prospecting...', 'Qualifying...', 'Presenting...', 'Negotiating...', 'Closed!']"
1111
/>
1212
</template>
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
<script setup lang="ts">
2+
import type { ProgressProps } from '@bitrix24/b24ui-nuxt'
3+
24
export interface ExampleProps {
3-
orientation?: any
5+
orientation?: ProgressProps['orientation']
46
}
57
68
withDefaults(defineProps<ExampleProps>(), {
7-
orientation: 'horizontal'
9+
orientation: 'horizontal' as const
810
})
911
</script>
1012

1113
<template>
1214
<B24Progress
1315
:orientation="orientation"
14-
class="h-48"
1516
/>
1617
</template>

docs/examples/progress/demo/Size.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<script setup lang="ts">
2+
import type { ProgressProps } from '@bitrix24/b24ui-nuxt'
3+
24
export interface ExampleProps {
3-
size?: any
5+
size?: ProgressProps['size']
46
}
57
68
withDefaults(defineProps<ExampleProps>(), {
7-
size: 'md'
9+
size: 'md' as const
810
})
911
</script>
1012

0 commit comments

Comments
 (0)