Skip to content

Commit b871a68

Browse files
committed
Add Xx-Small variant to Spinner
1 parent a8d0a41 commit b871a68

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

components/component-docs.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15225,6 +15225,10 @@
1522515225
"type": {
1522615226
"name": "enum",
1522715227
"value": [
15228+
{
15229+
"value": "'xx-small'",
15230+
"computed": false
15231+
},
1522815232
{
1522915233
"value": "'x-small'",
1523015234
"computed": false

components/spinner/__docs__/storybook-stories.jsx

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,24 @@ storiesOf(SPINNER, module)
2424
<IconSettings iconPath="/assets/icons">{getStory()}</IconSettings>
2525
</div>
2626
))
27+
.add('Xx-Small', () =>
28+
getSpinner({
29+
size: 'xx-small',
30+
variant: 'base',
31+
assistiveText: {
32+
label: 'Main Frame Loading...',
33+
},
34+
})
35+
)
36+
.add('X-Small', () =>
37+
getSpinner({
38+
size: 'x-small',
39+
variant: 'base',
40+
assistiveText: {
41+
label: 'Main Frame Loading...',
42+
},
43+
})
44+
)
2745
.add('Small', () =>
2846
getSpinner({
2947
size: 'small',
@@ -45,6 +63,18 @@ storiesOf(SPINNER, module)
4563
variant: 'base',
4664
})
4765
)
66+
.add('Brand Xx-Small', () =>
67+
getSpinner({
68+
size: 'xx-small',
69+
variant: 'brand',
70+
})
71+
)
72+
.add('Brand X-Small', () =>
73+
getSpinner({
74+
size: 'x-small',
75+
variant: 'brand',
76+
})
77+
)
4878
.add('Brand Small', () =>
4979
getSpinner({
5080
size: 'small',
@@ -71,6 +101,24 @@ storiesOf(SPINNER, module)
71101
isDelayed: true,
72102
})
73103
)
104+
.add(
105+
'Inverse Xx-Small',
106+
() =>
107+
getSpinner({
108+
size: 'xx-small',
109+
variant: 'inverse',
110+
}),
111+
{ decorators: [inverseContainer] }
112+
)
113+
.add(
114+
'Inverse X-Small',
115+
() =>
116+
getSpinner({
117+
size: 'x-small',
118+
variant: 'inverse',
119+
}),
120+
{ decorators: [inverseContainer] }
121+
)
74122
.add(
75123
'Inverse Small',
76124
() =>

components/spinner/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const propTypes = {
5151
/**
5252
* Determines the size of the spinner
5353
*/
54-
size: PropTypes.oneOf(['x-small', 'small', 'medium', 'large']),
54+
size: PropTypes.oneOf(['xx-small', 'x-small', 'small', 'medium', 'large']),
5555
/**
5656
* Determines the color of the spinner: `base` is gray, `brand` is blue, and `inverse` is white.
5757
*/

0 commit comments

Comments
 (0)