Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/api/spinner.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ import Colors from '@site/static/usage/v7/spinner/theming/colors/index.md';

<Colors />

### Styling

You may use custom CSS to style the spinner. For example, you can resize the spinner by setting the width and height.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion to change: You can resize the spinner by setting the width and height.


import Resizing from '@site/static/usage/v7/spinner/theming/resizing/index.md';

<Resizing />

### CSS Custom Properties

import CSSProps from '@site/static/usage/v7/spinner/theming/css-properties/index.md';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```css
ion-spinner {
width: 100px;
height: 100px;
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```html
<ion-spinner></ion-spinner>
```
29 changes: 29 additions & 0 deletions static/usage/v7/spinner/theming/resizing/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Spinner</title>
<link rel="stylesheet" href="../../../../common.css" />
<script src="../../../../common.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core@7/dist/ionic/ionic.esm.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core@7/css/ionic.bundle.css" />

<style>
ion-spinner {
width: 100px;
height: 100px;
}
</style>
</head>

<body>
<ion-app>
<ion-content>
<div class="container">
<ion-spinner></ion-spinner>
</div>
</ion-content>
</ion-app>
</body>
</html>
32 changes: 32 additions & 0 deletions static/usage/v7/spinner/theming/resizing/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import Playground from '@site/src/components/global/Playground';

import javascript from './javascript.md';

import react_main_tsx from './react/main_tsx.md';
import react_main_css from './react/main_css.md';

import vue from './vue.md';

import angular_example_component_html from './angular/example_component_html.md';
import angular_example_component_css from './angular/example_component_css.md';

<Playground
version="6"
code={{
javascript,
react: {
files: {
'src/main.tsx': react_main_tsx,
'src/main.css': react_main_css,
},
},
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.css': angular_example_component_css,
},
},
}}
src="usage/v7/spinner/theming/resizing/demo.html"
/>
10 changes: 10 additions & 0 deletions static/usage/v7/spinner/theming/resizing/javascript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
```html
<ion-spinner></ion-spinner>

<style>
ion-spinner {
width: 100px;
height: 100px;
}
</style>
```
9 changes: 9 additions & 0 deletions static/usage/v7/spinner/theming/resizing/react.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```tsx
import React from 'react';
import { IonSpinner } from '@ionic/react';

function Example() {
return <IonSpinner></IonSpinner>;
}
export default Example;
```
6 changes: 6 additions & 0 deletions static/usage/v7/spinner/theming/resizing/react/main_css.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```css
ion-spinner {
width: 100px;
height: 100px;
}
```
15 changes: 15 additions & 0 deletions static/usage/v7/spinner/theming/resizing/react/main_tsx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```tsx
import React from 'react';
import { IonSpinner } from '@ionic/react';

import './main.css';

function Example() {
return (
<>
<IonSpinner></IonSpinner>
</>
);
}
export default Example;
```
21 changes: 21 additions & 0 deletions static/usage/v7/spinner/theming/resizing/vue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
```html
<template>
<ion-spinner></ion-spinner>
</template>

<script lang="ts">
import { IonSpinner } from '@ionic/vue';
import { defineComponent } from 'vue';

export default defineComponent({
components: { IonSpinner },
});
</script>

<style scoped>
ion-spinner {
width: 100px;
height: 100px;
}
</style>
```