Skip to content

Commit bd6f479

Browse files
committed
docs: update readme
1 parent 68e0674 commit bd6f479

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

README.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
<a href="https://www.npmjs.com/package/ionic-react-header-parallax"><img src="https://img.shields.io/npm/dt/ionic-react-header-parallax.svg?style=for-the-badge"></a>
2222
</p>
2323

24-
## [Live Demo](https://github-mjaqg5-pzh6fv.stackblitz.io)
24+
## Overview
25+
26+
<p align="center">
27+
<img hight="120px;" src="images/demo.gif"></img>
28+
[Youtube video URL](https://www.youtube.com/watch?v=YZ5nlRjstA4)
29+
</p>
2530

2631
## [Stackblitz Editor URL](https://stackblitz.com/edit/github-mjaqg5-pzh6fv?file=src/pages/Home.tsx)
2732

@@ -41,43 +46,36 @@ yarn add ionic-react-header-parallax
4146

4247
```tsx
4348
import * as React from 'react'
44-
import {
45-
IonBackButton,
46-
IonButton,
47-
IonButtons,
48-
IonContent,
49-
IonHeader,
50-
IonPage,
51-
IonTitle,
52-
IonToolbar,
53-
} from '@ionic/react'
49+
import { IonBackButton, IonButtons, IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react'
5450
import { useIonHeaderParallax } from 'ionic-react-header-parallax'
5551

5652
const Home: React.FC = () => {
5753

58-
const {ref} = useIonHeaderParallax({ image: 'https://picsum.photos/1080' })
54+
const { ref } = useIonHeaderParallax({
55+
image: 'https://picsum.photos/1080',
56+
showBarButtons: true,
57+
})
5958

6059
return (
6160
<IonPage>
62-
<IonHeader translucent ref={ref}>
63-
<IonToolbar mode="ios">
61+
<IonHeader ref={ref}>
62+
<IonToolbar>
6463
<IonButtons slot="start">
6564
<IonBackButton defaultHref="/" />
6665
</IonButtons>
67-
<IonTitle>Post Details</IonTitle>
68-
<IonButtons slot="end">
69-
<IonButton>Button</IonButton>
70-
</IonButtons>
66+
<IonTitle>Post Title</IonTitle>
7167
</IonToolbar>
7268
</IonHeader>
7369

74-
<IonContent className="ion-padding">
70+
<IonContent className="ion-padding-start ion-padding-end">
7571
{...}
7672
</IonContent>
7773
</IonPage>
7874
)
7975
}
8076

77+
export default Home
78+
8179
```
8280

8381
## API

images/demo.gif.gif

2.78 MB
Loading

0 commit comments

Comments
 (0)