From 8c0f4e921244bb26801361818eff3a21247c31e3 Mon Sep 17 00:00:00 2001 From: Carlinhos <91576261+carl0smat3us@users.noreply.github.com> Date: Tue, 26 Dec 2023 22:06:53 +0100 Subject: [PATCH] docs(usage-example): update the example for suport Typescript too (#482) --- README.md | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 336d4dcd..dc75c1d6 100644 --- a/README.md +++ b/README.md @@ -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 ``](#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 ``](#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 @@ -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", @@ -69,7 +71,7 @@ const styles = { fontSize: 48, fontWeight: "bold" } -}; +}); export default () => (