0.1.9 • Published 5 months ago

react-hyukie-bottom-sheet v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

react-hyukie-bottom-sheet

A simple Bottom Sheet that can be used in React

Installation

npm

npm install react-hyukie-bottom-sheet --save

yarn

yarn add react-hyukie-bottom-sheet

Example

import { useState } from "react";
import { BottomSheet } from "react-hyukie-bottom-sheet";

function App() {
  const [isShow, setIsShow] = useState(false);

  const handleBottomSheet = () => {
    setIsShow((prev) => !prev);
  };

  return (
    <>
      <button onClick={handleBottomSheet}>
        <h1>Bottom-Sheet Show</h1>
      </button>
      <BottomSheet
        handleBottomSheet={handleBottomSheet}
        isShow={isShow}
        contents={<p>Hello world</p>}
      />
    </>
  );
}

export default App;

props

Prop nameessentialtypeDescriptionExample
isShowXbooleanA value that determines whether the bottom sheet comes out or not.true
handleBottomSheetXfunctionA function that manages isShow, a value that determines whether the bottom sheet comes out or not.setIsShow((prev) => !prev)
contentsXReact.ReactNodeContent to be placed inside the bottom sheet<p>Hello World</p>
heightXnumberHeight that the bottom sheet will occupy on the screen (vertical size)350
backGroundColorXstringExisting screen color when Bottom Sheet is raisedgray rgba(0, 0, 0, 0.2) #fff ...
shadowXstringBottom Sheet's Top Shadow Style0px 0px 5px 0px rgba(0, 0, 0, 0.45)
durationXnumberThe speed at which the bottom sheet rises500
borderRadiusXnumberLeft and right bends at the top of the bottom sheet rises16
0.1.8

5 months ago

0.1.7

5 months ago

0.1.9

5 months ago

0.1.6

5 months ago

0.1.5

5 months ago

0.1.0

10 months ago

0.1.2

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0

10 months ago