Skip to content

Commit fbaa8d4

Browse files
committed
feat(spinners): add delay class to delay animation for 300ms
1 parent a1f7038 commit fbaa8d4

File tree

4 files changed

+60
-145
lines changed

4 files changed

+60
-145
lines changed

ui/components/spinners/base/_index.scss

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,40 @@
121121
animation-delay: 750ms;
122122
}
123123

124+
/**
125+
* @summary Set a delay of 300ms on spinner
126+
* @selector .slds-spinner_delayed
127+
* @restrict .slds-spinner
128+
* @modifier
129+
* @group timing
130+
*/
131+
.slds-spinner_delayed {
132+
133+
&:before {
134+
animation-delay: 216.66667ms;
135+
}
136+
137+
.slds-spinner__dot-a:before {
138+
animation-delay: 383.33333ms;
139+
}
140+
141+
.slds-spinner__dot-b:before {
142+
animation-delay: 550ms;
143+
}
144+
145+
&:after {
146+
animation-delay: 716.66667ms;
147+
}
148+
149+
.slds-spinner__dot-a:after {
150+
animation-delay: 883.33333ms;
151+
}
152+
153+
.slds-spinner__dot-b:after {
154+
animation-delay: 1050ms;
155+
}
156+
}
157+
124158

125159
/**
126160
* This creates the blue brand spinner
@@ -149,8 +183,6 @@
149183
*
150184
* @selector .slds-spinner_inverse
151185
* @restrict .slds-spinner
152-
* @modifier
153-
* @group color
154186
*/
155187

156188
.slds-spinner_inverse,

ui/components/spinners/base/example.jsx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import classNames from 'classnames';
88
// Partial(s)
99
/// ////////////////////////////////////////
1010

11-
let Demo = props => (
11+
const Demo = props => (
1212
<div
1313
className={classNames('demo-only', props.className)}
1414
style={{ height: '6rem' }}
@@ -78,5 +78,30 @@ export let examples = [
7878
</SpinnerContainer>
7979
</Demo>
8080
)
81+
},
82+
{
83+
id: 'inverse',
84+
label: 'On inverse background',
85+
element: (
86+
<div
87+
className="demo-only"
88+
style={{ backgroundColor: '#16325c', height: '6rem' }}
89+
>
90+
<SpinnerContainer>
91+
<Spinner className="slds-spinner_medium slds-spinner_inverse" />
92+
</SpinnerContainer>
93+
</div>
94+
)
95+
},
96+
{
97+
id: 'delayed',
98+
label: 'With 300ms delay',
99+
element: (
100+
<Demo>
101+
<SpinnerContainer>
102+
<Spinner className="slds-spinner_medium slds-spinner_delayed" />
103+
</SpinnerContainer>
104+
</Demo>
105+
)
81106
}
82107
];

ui/components/spinners/colors/example.jsx

Lines changed: 0 additions & 60 deletions
This file was deleted.

ui/components/spinners/sizes/example.jsx

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)