From f39db982cd2b5fee0fac9b3d89b3d2b677a28b07 Mon Sep 17 00:00:00 2001 From: Stanley Ugwu Date: Tue, 9 Jan 2024 17:44:00 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs:=20correct=20example=20code?= =?UTF-8?q?=20snippet=20mistake=20for=20typescript=20and=20javascript.=20F?= =?UTF-8?q?ixes=20#11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 124 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 4e5de7a..c9ac742 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # React Native Bottom Sheet 💖 + ![GitHub](https://img.shields.io/github/license/stanleyugwu/react-native-bottom-sheet?style=plastic&label=License&color=%23fea9f8) ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/stanleyugwu/react-native-bottom-sheet/ci.yml?color=%23fea9f8&label=Build) [![runs with expo](https://img.shields.io/badge/Expo-Support-fea9f8.svg?style=platic&logo=EXPO&logoColor=fff)](https://expo.io/) @@ -6,11 +7,12 @@ ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@devvie/bottom-sheet?style=plastic&logo=npm&color=%23fea9f8&label=Bundle%20Size) ![npm downloads](https://img.shields.io/npm/dm/@devvie/bottom-sheet?style=plastic&logo=npm&color=%23fea9f8&label=Downloads) - The smart 😎, tiny 📦, and flexible 🎗 bottom sheet your app craves 🚀 ![Preview for Android & iOS](https://i.ibb.co/Y38XsMr/Combined.gif) + #### Web Preview +

@@ -45,7 +47,8 @@ yarn add @devvie/bottom-sheet ``` ## 📱 Minimal Usage -Opening and closing the bottom sheet is done imperatively, so just pass a `ref` to the bottom sheet and call the `open` or `close` methods via the `ref` instance to open and close the bottom sheet respectively. + +Opening and closing the bottom sheet is done imperatively, so just pass a `ref` to the bottom sheet and call the `open` or `close` methods via the `ref` instance to open and close the bottom sheet respectively. ##### Examples @@ -54,130 +57,139 @@ Opening and closing the bottom sheet is done imperatively, so just pass a `ref` ```tsx import React, { useRef } from 'react'; import BottomSheet, { BottomSheetMethods } from '@devvie/bottom-sheet'; -import { Button } from 'react-native'; +import { Button, View } from 'react-native'; const App = () => { const sheetRef = useRef(null); return ( -