mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor(spinner): rename lines-sm to lines-small
also adds this spinner class to the infinite scroll to override the color
This commit is contained in:
@ -12,7 +12,7 @@ The default spinner to use is based on the platform. The default spinner for `io
|
||||
<ion-spinner name="lines"></ion-spinner>
|
||||
|
||||
<!-- Lines Small -->
|
||||
<ion-spinner name="lines-sm"></ion-spinner>
|
||||
<ion-spinner name="lines-small"></ion-spinner>
|
||||
|
||||
<!-- Dots -->
|
||||
<ion-spinner name="dots"></ion-spinner>
|
||||
@ -66,7 +66,7 @@ For more information, see [Platform Styles](/docs/theming/platform-specific-styl
|
||||
string
|
||||
|
||||
The name of the SVG spinner to use. If a name is not provided, the platform's default
|
||||
spinner will be used. Possible values are: `"lines"`, `"lines-sm"`, `"dots"`, `"bubbles"`,
|
||||
spinner will be used. Possible values are: `"lines"`, `"lines-small"`, `"dots"`, `"bubbles"`,
|
||||
`"circles"`, `"crescent"`.
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ For more information, see [Platform Styles](/docs/theming/platform-specific-styl
|
||||
string
|
||||
|
||||
The name of the SVG spinner to use. If a name is not provided, the platform's default
|
||||
spinner will be used. Possible values are: `"lines"`, `"lines-sm"`, `"dots"`, `"bubbles"`,
|
||||
spinner will be used. Possible values are: `"lines"`, `"lines-small"`, `"dots"`, `"bubbles"`,
|
||||
`"circles"`, `"crescent"`.
|
||||
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ export const SPINNERS: SpinnerConfigs = {
|
||||
}
|
||||
},
|
||||
|
||||
'lines-sm': {
|
||||
'lines-small': {
|
||||
dur: 1000,
|
||||
lines: 12,
|
||||
fn: (dur: number, index: number, total: number) => {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
.spinner-lines-ios line,
|
||||
.spinner-lines-sm-ios line {
|
||||
.spinner-lines-small-ios line {
|
||||
stroke: $spinner-ios-lines-color;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
.spinner-ios-#{$color-name} {
|
||||
|
||||
&.spinner-lines line,
|
||||
&.spinner-lines-sm line,
|
||||
&.spinner-lines-small line,
|
||||
&.spinner-crescent circle {
|
||||
stroke: $color-base;
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
.spinner-lines-md line,
|
||||
.spinner-lines-sm-md line {
|
||||
.spinner-lines-small-md line {
|
||||
stroke: $spinner-md-lines-color;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
.spinner-md-#{$color-name} {
|
||||
|
||||
&.spinner-lines line,
|
||||
&.spinner-lines-sm line,
|
||||
&.spinner-lines-small line,
|
||||
&.spinner-crescent circle {
|
||||
stroke: $color-base;
|
||||
}
|
||||
|
||||
@ -27,17 +27,17 @@ ion-spinner.spinner-paused svg {
|
||||
}
|
||||
|
||||
|
||||
// Spinner: lines / lines-sm
|
||||
// Spinner: lines / lines-small
|
||||
// --------------------------------------------------
|
||||
|
||||
.spinner-lines line,
|
||||
.spinner-lines-sm line {
|
||||
.spinner-lines-small line {
|
||||
stroke-width: 4px;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
|
||||
.spinner-lines svg,
|
||||
.spinner-lines-sm svg {
|
||||
.spinner-lines-small svg {
|
||||
animation: spinner-fade-out 1s linear infinite;
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ export class Spinner {
|
||||
|
||||
/**
|
||||
* The name of the SVG spinner to use. If a name is not provided, the platform's default
|
||||
* spinner will be used. Possible values are: `"lines"`, `"lines-sm"`, `"dots"`, `"bubbles"`,
|
||||
* spinner will be used. Possible values are: `"lines"`, `"lines-small"`, `"dots"`, `"bubbles"`,
|
||||
* `"circles"`, `"crescent"`.
|
||||
*/
|
||||
@Prop() name: string;
|
||||
@ -65,8 +65,8 @@ export class Spinner {
|
||||
name = 'lines';
|
||||
} else if (name === 'ios-small') {
|
||||
// deprecation warning, renamed in v4
|
||||
console.warn(`spinner "ios-small" has been renamed to "lines-sm"`);
|
||||
name = 'lines-sm';
|
||||
console.warn(`spinner "ios-small" has been renamed to "lines-small"`);
|
||||
name = 'lines-small';
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
Show Lines
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
<ion-spinner slot="start" name="lines-sm"></ion-spinner>
|
||||
<ion-spinner slot="start" name="lines-small"></ion-spinner>
|
||||
Show Lines Small
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
|
||||
Reference in New Issue
Block a user