Button- 윤호, ģž‘ģ—…ģ™„ė£Œ

Usage

props

  • width : ė²„ķŠ¼ģ˜ ė„ˆė¹„ (źø°ė³øź°’: 550)
  • heigth : ė²„ķŠ¼ģ˜ ė†’ģ“ (źø°ė³øź°’: 56)
  • backgroundColor : ė²„ķŠ¼ģ˜ ė°°ź²½ģƒ‰ (źø°ė³øź°’: #FFD039)
  • fontColor : ė²„ķŠ¼ģ˜ źø€ģžģƒ‰ (źø°ė³øź°’: white)
  • fontSize : ė²„ķŠ¼ģ˜ źø€ģž 크기 (źø°ė³øź°’: 16px)

example

  • default ė²„ķŠ¼
<Button>źø°ė³øė²„ķŠ¼</Button>
 
  • ģ»¤ģŠ¤ķ…€ ė²„ķŠ¼1
<Button width={550} height='56px' backgroundColor={yellow} fontColor={#fff} fontSize={16}> ģ»¤ģŠ¤ķ…€ė²„ķŠ¼ </Button>
 
  • ģ»¤ģŠ¤ķ…€ ė²„ķŠ¼2
const buttonStyle = { width: '550px', height: 56, backgroundColor= 'rgba(233, 53, 80, 1)', fontColor: 'red', fontSize: '16px' } <Button {...buttonStyle}>ģ»¤ģŠ¤ķ…€ė²„ķŠ¼</Button>
 

ź°œģ„ ķ•“ģ•¼ķ•  점

width 값에 ė”°ė¼ border-radius ź°’ģ“ ģ •ķ•“ģ§€ė„ė” źµ¬ķ˜„ģ“ ė˜ģ–“ģžˆģŠµė‹ˆė‹¤.
  • width ≄ 250px → border-radius=16px
  • width < 250px → border-radius=12px
ķ—ˆė‚˜ width ź°’ģœ¼ė”œ % 와 ź°™ģ€ ģƒėŒ€źøøģ“ ė‹Øģœ„ź°€ ģ™”ģ„ ė•Œ ģ–“ė–»ź²Œ ė°˜ģ‘ģ ģœ¼ė”œ border-radius ź°’ģ„ ģ •ķ• ģˆ˜ ģžˆģ„ź¹Œ ź³ ėÆ¼ģ¤‘ģž…ė‹ˆė‹¤.
ģƒėŒ€źøøģ“ ė‹Øģœ„ė”œ ģ •ķ•“ģ§„ ė²„ķŠ¼ģ˜ ė„ˆė¹„ź°’ģ„ styled ģ»“ķ¬ė„ŒķŠøģ˜ props 딜 ė„˜ź²Øė°›ģ•„ģ„œ ģ •ķ•˜ėŠ” ė°©ģ‹ģœ¼ė”œ źµ¬ķ˜„ģ„ ģƒź°ķ•˜ź³  ģžˆėŠ”ė° ģ–“ė–»ź²Œ źµ¬ķ˜„ķ•“ģ•¼ķ• ģ§€ ź³ ėÆ¼ģ¤‘ģž…ė‹ˆė‹¤.

개발 ķžˆģŠ¤ķ† ė¦¬