Git Product home page Git Product logo

icon-button-ui's Introduction

๐Ÿ™Œ Icon, UploadButton UI Component

ํ”ผ๊ทธ๋งˆ ์‹œ์•ˆ์„ ์ œ๊ณต๋ฐ›์•„ ๋ฆฌ์•กํŠธ๋กœ ๋ฒ„ํŠผ UI ๋ฅผ ๊ตฌํ˜„ํ•˜๋Š” ์‹ค์Šต์ž…๋‹ˆ๋‹ค.
์™„์„ฑ๋œ ๋ชจ์Šต์ž…๋‹ˆ๋‹ค.

แ„‡แ…ฅแ„แ…ณแ†ซUI


๐Ÿ’ก ์‚ฌ์šฉ๋ฒ•

  1. ๋ฒ„ํŠผ UI ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ €์žฅํ•  ํด๋”๋ฅผ ๋งŒ๋“ค๊ณ , ํ„ฐ๋ฏธ๋„ ์ฐฝ์„ ์—ด์–ด ๋ฐ‘์˜ ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ•˜์—ฌ git clone ํ•ฉ๋‹ˆ๋‹ค.
https://github.com/CHAERYEON-LEE/icon-button-UI.git
  1. ๋ฒ„ํŠผ์„ ์‹คํ–‰์‹œํ‚ค๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•œ ๋ชจ๋“ˆ์„ ์„ค์น˜ํ•˜๋ ค๋ฉด ํ•ด๋‹น ๋ช…๋ น์–ด๋ฅผ ํ„ฐ๋ฏธ๋„์— ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
npm i 
  1. ๋ฒ„ํŠผ์„ local์—์„œ ์‹คํ–‰์‹œํ‚ค๋ ค๋ฉด ํ•ด๋‹น ๋ช…๋ น์–ด๋ฅผ ํ„ฐ๋ฏธ๋„์— ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
npm run dev

๐Ÿ’ก UploadButton ์ปดํฌ๋„ŒํŠธ ์‚ฌ์šฉ๋ฒ•

๊ธฐ๋ณธ ์ œ๊ณต๋˜๋Š” ๋ฒ„ํŠผ์˜ ์ข…๋ฅ˜๋Š” 5๊ฐ€์ง€ ์ž…๋‹ˆ๋‹ค.

status idle pending resolved rejected disabled
์ƒํƒœ ์—…๋กœ๋“œ ์—…๋กœ๋“œ ์ค‘ ์™„๋ฃŒ ์—…๋กœ๋“œ์‹คํŒจ ์‹คํŒจ
์ถœ๋ ฅ แ„‹แ…ฅแ†ธแ„…แ…ฉแ„ƒแ…ณ แ„‹แ…ฅแ†ธแ„…แ…ฉแ„ƒแ…ณแ„Œแ…ฎแ†ผ แ„‹แ…ชแ†ซแ„…แ…ญ แ„‹แ…ฅแ†ธแ„…แ…ฉแ„ƒแ…ณแ„‰แ…ตแ†ฏแ„‘แ…ข แ„‰แ…ตแ†ฏแ„‘แ…ข

์ปดํฌ๋„ŒํŠธ ์‚ฌ์šฉ ์‹œ

<UploadButton status="idle"></UploadButton>
<UploadButton status="pending"></UploadButton>
<UploadButton status="resolved"></UploadButton>
<UploadButton status="rejected"></UploadButton>
<UploadButton status="disabled"></UploadButton>

UploadButton ๊ธฐ๋ณธ ์ƒํƒœ

status ๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์ง€ ์•Š์•„๋„ ๋ฒ„ํŠผ์˜ ๊ธฐ๋ณธ status ๋Š” idle(์ž…๋ ฅ์ค‘)์œผ๋กœ ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

<UploadButton></UploadButton>

์ถœ๋ ฅ

แ„‹แ…ฅแ†ธแ„…แ…ฉแ„ƒแ…ณ


๐Ÿ’ก ๋ฒ„ํŠผ์— ํ…์ŠคํŠธ๋‚˜, ์•„์ด์ฝ˜์„ ์ถ”๊ฐ€ํ•˜๊ณ  ์‹ถ์„ ๋•Œ

src/components/UploadButton.js ํŒŒ์ผ์˜ uploadStatus ๊ฐ์ฒด์— ํ”„๋กœํผํ‹ฐ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

src/components/UploadButton.js ํŒŒ์ผ์˜ uploadStatus ๊ฐ์ฒด์˜ˆ์‹œ

const uploadStatus = {
    idle:{
        text: "์—…๋กœ๋“œ",
        path: "../assets/icons/type=up-arrow.svg"
    },
    pending:{
        text: "์—…๋กœ๋“œ ์ค‘",
        path: "../assets/icons/type=spinner-animate.svg"
    },
    resolved:{
        text: "์™„๋ฃŒ",
        path: "../assets/icons/type=check-mark.svg"
    },
    rejected:{
        text: "์‹คํŒจ",
        path: "../assets/icons/type=cross.svg"
    },
    disabled:{
        text: "์—…๋กœ๋“œ",
        path: "../assets/icons/type=not-allowed.svg",
        style: {
            filter:'invert(76%) sepia(8%) saturate(202%) hue-rotate(196deg) brightness(92%) contrast(89%)'
        }
    }
}

ํ”„๋กœํผํ‹ฐ ์ถ”๊ฐ€

const uploadStatus = {
    sayYeah:{
        text: "์•ˆ๋…•",
        path: "../assets/icons/type=up-arrow.svg"
    }
}

์‚ฌ์šฉ ์˜ˆ์‹œ

<UploadButton status="sayYeah"></UploadButton>

์ถœ๋ ฅ

แ„‹แ…กแ†ซแ„‚แ…งแ†ผแ„‡แ…ฅแ„แ…ณแ†ซ

icon-button-ui's People

Contributors

chaeryeon-lee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.