Socket
Book a DemoInstallSign in
Socket

@happyfresh/bottom-sheet

Package Overview
Dependencies
Maintainers
7
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@happyfresh/bottom-sheet

HappyFresh UI components that is a bottom-sheet

latest
npmnpm
Version
1.14.5
Version published
Weekly downloads
6
50%
Maintainers
7
Weekly downloads
 
Created
Source

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>
  );
};

FAQs

Package last updated on 28 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts