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

celuveat-ui-library

v1.6.1

Published

셀럽잇 UI 라이브러리

Downloads

103

Readme

Celuveat-ui-library

라이브러리 동작 환경

react >= 18 version
react.dom >= 18 version

DropDown

<DropDown>
  <DropDown.Trigger>trigger</DropDown.Trigger>
  <DropDown.Options>
    <DropDown.Option>DROP_DOWN_ITEMS</DropDown.Option>
    <DropDown.Option>DROP_DOWN_ITEMS</DropDown.Option>
  </DropDown.Options>
</DropDown>
  • 다음과 같은 컴포넌트를 구성하면 다음과 같은 DropDown 스타일과 기능을 사용할 수 있다.

드랍다운

사용법

Trigger

- isCustom: 사용자가 버튼의 자신만의 스타일을 적용하고 싶을 때 사용, 스타일링한 하위 컴포넌트에 스타일을 적용
  - 사용 시 주의사항
   1. 자식 태그는 꼭 하나만 적용. (아닐 경우 에러)
   2. 자식 태그를 컴포넌트로 넘겨줄 경우 해당 컴포넌트에 onClick, as, 속성을 넘겨주어야 한다.

- externalClick: trigger를 click했을 때 DropDown.Options리스트를 끄고 키는 기능 이외의 다른 기능을 추가하고 싶을 때 사용

Options

- isCustom: 사용자가 버튼의 자신만의 스타일을 적용하고 싶을 때 사용, 스타일링한 하위 컴포넌트에 스타일을 적용
  - 사용 시 주의사항
   1. 자식 태그는 꼭 하나만 적용. (아닐 경우 에러)
   2. 자식 태그를 컴포넌트로 넘겨줄 경우 해당 컴포넌트에 onClick, as, 속성을 넘겨주어야 한다.

- externalClick: trigger를 click했을 때 DropDown.Options리스트를 끄고 키는 기능 이외의 다른 기능을 추가하고 싶을 때 사용

Option

- isCustom: 사용자가 버튼의 자신만의 스타일을 적용하고 싶을 때 사용, 스타일링한 하위 컴포넌트에 스타일을 적용
  - 사용 시 주의사항
   1. 자식 태그는 꼭 하나만 적용. (아닐 경우 에러)
   2. 자식 태그를 컴포넌트로 넘겨줄 경우 해당 컴포넌트에 onClick, as, externalClick 속성을 넘겨주어야 한다.

- externalClick: trigger를 click했을 때 DropDown.Options리스트를 끄고 키는 기능 이외의 다른 기능을 추가하고 싶을 때 사용

자세한 건 코드 샌드박스를 통해서 확인해보세요!!

링크

Modal

<Modal>
  <Modal.Trigger as={<StyledButton>open!</StyledButton>} />
  <Modal.Overlay portalId='portal' as={<StyledOverlay />} />
  <Modal.Content portalId='portal'>
    <Modal.Closer as={<StyledExitButton>X</StyledExitButton>} />
  </Modal.Content>
</Modal>

사용법

Trigger

  • 모달을 열어주는 컴포넌트입니다.
as : ReactElement를 인자로 받아 클릭시 모달을 열어주는 함수를 부착하여 반환합니다.

Overlay

as : 모달의 Backdrop 역할을 하는 함수입니다. ReactElement를 인자로 받아 클릭시 모달을 닫아주는 함수를 부착하여 반환합니다.
portalId : 모달을 부착시킬 DOM Element의 id를 입력받습니다.

Content

children : 모달 컨텐츠에 해당하는 ReactNode를 인자로 입력받습니다.
portalId : 모달을 부착시킬 DOM Element의 id를 입력받습니다.

Closer

as : ReactElement를 인자로 받아 클릭시 모달을 닫아주는 함수를 부착하여 반환합니다.