@happyfresh/bottom-sheet

1.14.5 • Public • Published

BottomSheet

A React component that is a BottomSheet. New version will be featured with header in bottomsheet

Installation

yarn add @happyfresh/bottom-sheet

Usage

import React, { useState } from 'react';
import { BottomSheet } from '@happyfresh/bottom-sheet';
import { css } from 'emotion';

export default {
  title: 'BottomSheet',
};

export const BottomSheetBasic = () => {
  const [open, setOpen] = useState(false);

  const handleRequestClose = () => {
    setOpen(false);
  };

  return (
    <div>
      <button onClick={() => setOpen(true)}>Open!</button>
      <BottomSheet open={open} onRequestClose={handleRequestClose} withCloseButton styles={{
          close: {
            top: 0
          }
        }}>
        <div>your child components here</div>
      </BottomSheet>
    </div>
  );
};

Readme

Keywords

none

Package Sidebar

Install

npm i @happyfresh/bottom-sheet

Weekly Downloads

13

Version

1.14.5

License

MIT

Unpacked Size

248 kB

Total Files

5

Last publish

Collaborators

  • miftahfaris
  • rozakbuhari
  • fathurozak.buhari
  • numan.naufal.hf
  • dimassaputrak
  • viltohmyst
  • rakaaditya