mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(stencil): add stencil usage to components (#21261)
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<ion-content>
|
||||
|
||||
<!-- Fixed Floating Action Button that does not scroll with the content -->
|
||||
<ion-fab>
|
||||
<ion-fab slot="fixed">
|
||||
<ion-fab-button>Button</ion-fab-button>
|
||||
</ion-fab>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ion-content>
|
||||
|
||||
<!-- Fixed Floating Action Button that does not scroll with the content -->
|
||||
<ion-fab>
|
||||
<ion-fab slot="fixed">
|
||||
<ion-fab-button>Button</ion-fab-button>
|
||||
</ion-fab>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { IonContent, IonFab, IonFabButton } from '@ionic/react';
|
||||
export const FabButtonExample: React.FC = () => (
|
||||
<IonContent>
|
||||
{/*-- Fixed Floating Action Button that does not scroll with the content --*/}
|
||||
<IonFab>
|
||||
<IonFab slot="fixed">
|
||||
<IonFabButton>Button</IonFabButton>
|
||||
</IonFab>
|
||||
|
||||
|
||||
35
core/src/components/fab-button/usage/stencil.md
Normal file
35
core/src/components/fab-button/usage/stencil.md
Normal file
@@ -0,0 +1,35 @@
|
||||
```tsx
|
||||
import { Component, h } from '@stencil/core';
|
||||
|
||||
@Component({
|
||||
tag: 'fab-button-example',
|
||||
styleUrl: 'fab-button-example.css'
|
||||
})
|
||||
export class FabButtonExample {
|
||||
render() {
|
||||
return [
|
||||
<ion-content>
|
||||
|
||||
{/* Fixed Floating Action Button that does not scroll with the content */}
|
||||
<ion-fab slot="fixed">
|
||||
<ion-fab-button>Button</ion-fab-button>
|
||||
</ion-fab>
|
||||
|
||||
{/* Default Floating Action Button that scrolls with the content */}
|
||||
<ion-fab-button>Default</ion-fab-button>
|
||||
|
||||
{/* Mini */}
|
||||
<ion-fab-button size="small">Mini</ion-fab-button>
|
||||
|
||||
{/* Colors */}
|
||||
<ion-fab-button color="primary">Primary</ion-fab-button>
|
||||
<ion-fab-button color="secondary">Secondary</ion-fab-button>
|
||||
<ion-fab-button color="danger">Danger</ion-fab-button>
|
||||
<ion-fab-button color="light">Light</ion-fab-button>
|
||||
<ion-fab-button color="dark">Dark</ion-fab-button>
|
||||
|
||||
</ion-content>
|
||||
];
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -3,7 +3,7 @@
|
||||
<ion-content>
|
||||
|
||||
<!-- Fixed Floating Action Button that does not scroll with the content -->
|
||||
<ion-fab>
|
||||
<ion-fab slot="fixed">
|
||||
<ion-fab-button>Button</ion-fab-button>
|
||||
</ion-fab>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user