npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

chico-custom-modal

v0.0.17

Published

npm modules

Downloads

21

Readme

Button Module 사용 가이드

Modal Component 사용 방법

설치

npm install your-modal-library
# 또는
yarn add your-modal-library

사용법

Modal 컴포넌트는 다음과 같이 사용할 수 있습니다.

    <Modal position: 'center'>
      <Modal.Header>
        <Modal.Title title='예시' />
        <Modal.Button
          buttonColor={{
            backgroundColor: 'white',
            fontColor: '#8B95A1',
          }}
        >
          <img src={xButton}></img>
        </Modal.Button>
      </Modal.Header>
      <Modal.Body>
        <div>예시입니다.</div>
      </Modal.Body>
      <Modal.Footer>
        <Modal.Button>취소</Modal.Button>
        <Modal.Button>확인</Modal.Button>
      </Modal.Footer>
    </Modal>

컴포넌트 설명

Modal 컴포넌트는 다음과 같은 props를 받을 수 있습니다.

  • position: 모달의 위치를 결정합니다 ('bottom', 'center'). 기본값은 'center'입니다.
  • size: 모달의 크기를 결정합니다 ('small', 'medium', 'large'). 기본값은 'medium'입니다.
  • dimmedColor: 모달 배경의 색상을 정의합니다. 기본값은 'rgba(0, 0, 0, 0.35)'입니다.
  • onDimmedClick: 모달 외부를 클릭할 때 실행되는 함수입니다.
  • children: 모달에 포함할 요소들입니다.

Modal.Header 컴포넌트는 다음과 같은 props를 받을 수 있습니다.

  • children: 자식으로 헤더에 포함할 요소들입니다.

Modal.Body 컴포넌트는 다음과 같은 props를 받을 수 있습니다.

  • children: 자식으로 바디에 포함할 내용입니다.

Modal.Footer 컴포넌트는 다음과 같은 props를 받을 수 있습니다.

  • position: 푸터 내 요소의 배열 방향을 정의합니다 ('row', 'column'). 기본값은 'row'입니다.
  • children: 자식으로 푸터에 포함할 요소들입니다.

Modal.Title 컴포넌트는 다음과 같은 props를 받을 수 있습니다.

  • children: 자식으로 문자열을 입력받는다.

Modal.Button 컴포넌트는 다음과 같은 props를 받을 수 있습니다.

  • width : 'default' | 'stretch'하나를 선택해 버튼의 너비를 선택합니다. 기본값은 'default'입니다.
  • onClick: 버튼을 클릭할 때 실행되는 함수입니다.
  • buttonColor : 버튼의 색을 설정합니다. 기본값은 { backgroundColor: 'black', fontColor: 'white' }입니다.

모달 템플릿

  • AlertModal (확인 모달) : 사용자에게 메세지를 전달하고 확인 버튼만을 제공
  • ConfirmModal (확인/취소 모달) : 사용자에게 선택지를 제공하고 확인 및 취소 버튼 제공
  • PromptModal (입력 모달) : 사용자로부터 입력값을 받을 수 있는 입력 필드와 확인/취소 버튼 제공