Skip to content

Commit

Permalink
docs(usage-example): update the example for suport Typescript too (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamajus authored Dec 26, 2023
1 parent 0a544a2 commit 8c0f4e9
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@ If you need more advanced things like animations, lazy loading of images, or par

## Table of contents

- [Install](#install)
- [Basic example](#basic-example)
- [More examples](#more-examples)
- [Properties](#properties)
- [Basic carousel properties](#basic-carousel-properties)
- [Callbacks](#callbacks)
- [Methods](#methods)
- [Custom styling properties](#custom-styling-properties)
- [Custom render properties](#custom-render-properties)
- [Properties of `<ScrollView />`](#properties-of-scrollview)
- [Dependencies](#dependencies)
- [Development](#development)
- [Automated tests](#automated-tests)
- [Special thanks](#special-thanks)
- [License](#license)
- [Table of contents](#table-of-contents)
- [Install](#install)
- [Basic example](#basic-example)
- [More examples](#more-examples)
- [Properties](#properties)
- [Basic carousel properties](#basic-carousel-properties)
- [Callbacks](#callbacks)
- [Methods](#methods)
- [Custom styling properties](#custom-styling-properties)
- [Custom render properties](#custom-render-properties)
- [Properties of `<ScrollView />`](#properties-of-scrollview-)
- [Dependencies](#dependencies)
- [Development](#development)
- [How to develop locally](#how-to-develop-locally)
- [Automated tests](#automated-tests)
- [Special thanks](#special-thanks)
- [License](#license)

### Install

Expand All @@ -41,10 +43,10 @@ yarn add pinar --save

```jsx
import React from "react";
import { Text, View } from "react-native";
import { Text, View, StyleSheet } from "react-native";
import Carousel from "pinar";

const styles = {
const styles = StyleSheet.create({
slide1: {
flex: 1,
justifyContent: "center",
Expand All @@ -69,7 +71,7 @@ const styles = {
fontSize: 48,
fontWeight: "bold"
}
};
});

export default () => (
<Carousel>
Expand Down

0 comments on commit 8c0f4e9

Please sign in to comment.