This repository was archived by the owner on Mar 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +51
-0
lines changed Expand file tree Collapse file tree 5 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ module.exports = {
28
28
'components/checkbox-group' ,
29
29
'components/radio' ,
30
30
'components/radio-group' ,
31
+ 'components/spinner' ,
31
32
'components/tabs' ,
32
33
'components/textbox'
33
34
]
Original file line number Diff line number Diff line change
1
+ # Spinner
2
+ Spinner a component that indicate loading state.
3
+
4
+ ## Example
5
+
6
+ <div class =" p-3 border rounded-2 my-3 flex " >
7
+ <v-spinner class =" mr-5 " />
8
+ <v-spinner appearance =" primary " />
9
+ </div >
10
+
11
+ ``` html
12
+ <v-spinner />
13
+ <v-spinner appearance =" primary" />
14
+ ```
15
+
16
+ ## Props
17
+ Name | Type | Description | Default
18
+ ---------- | -------- | ----------- | ---------
19
+ appearance | String | Appearance of spinner [ 'default', 'primary'] | 'default'
Original file line number Diff line number Diff line change
1
+ import Spinner from './main.vue' ;
2
+
3
+ // eslint-disable-next-line func-names
4
+ Spinner . install = function ( Vue ) {
5
+ Vue . component ( 'VSpinner' , Spinner ) ;
6
+ } ;
7
+
8
+ export default Spinner ;
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" spinner" :class =" classes" ></div >
3
+ </template >
4
+
5
+ <script >
6
+ export default {
7
+ name: ' VSpinner' ,
8
+ props: {
9
+ appearance: {
10
+ type: String ,
11
+ default: ' default' ,
12
+ },
13
+ },
14
+ computed: {
15
+ classes () {
16
+ return [
17
+ ` spinner--${ this .appearance } ` ,
18
+ ];
19
+ },
20
+ },
21
+ };
22
+ </script >
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export { default as VCheckbox } from './Checkbox';
6
6
export { default as VCheckboxGroup } from './CheckboxGroup' ;
7
7
export { default as VRadio } from './Radio' ;
8
8
export { default as VRadioGroup } from './RadioGroup' ;
9
+ export { default as VSpinner } from './Spinner' ;
9
10
export { default as VTab } from './Tab' ;
10
11
export { default as VTabs } from './Tabs' ;
11
12
export { default as VTextbox } from './Textbox' ;
You can’t perform that action at this time.
0 commit comments