react-icons/go#GoDash JavaScript Examples

The following examples show how to use react-icons/go#GoDash. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DetailGuestPopup.js    From airdnd-frontend with MIT License 4 votes vote down vote up
DetailGuestPopup = ({
  adult,
  child,
  infant,
  popup,
  onOpenPopup,
  popupState,
  onClosePopup,
  increaseGuestCount,
  decreaseGuestCount,
  capacity,
  isFullCapacity,
  displayName,
  ...rest
}) => {
  return (
    <StGuests tabIndex="0" ref={popup} onClick={onOpenPopup} {...rest}>
      {displayName && <StName>인원</StName>}
      <StContent>
        게스트 {adult + child > 0 ? adult + child : 0}명
        {!!infant && infant > 0 && `, 유아 ${infant}명`}
      </StContent>
      <StPopup popupState={popupState} top="57px" left="-2px">
        <ul>
          <StCountGuest>
            <div>성인</div>
            <StCountBtn
              dimmed={adult <= 1}
              btnType="circle"
              onClick={() => decreaseGuestCount('adult')}
            >
              <GoDash />
            </StCountBtn>
            <div>{adult}</div>
            <StCountBtn
              dimmed={isFullCapacity}
              btnType="circle"
              onClick={() => increaseGuestCount('adult')}
            >
              <GoPlus />
            </StCountBtn>
          </StCountGuest>
          <StCountGuest>
            <div>
              어린이<div>2~12세</div>
            </div>
            <StCountBtn
              dimmed={!child}
              btnType="circle"
              onClick={() => decreaseGuestCount('child')}
            >
              <GoDash />
            </StCountBtn>
            <div>{child}</div>
            <StCountBtn
              dimmed={isFullCapacity}
              btnType="circle"
              onClick={() => increaseGuestCount('child')}
            >
              <GoPlus />
            </StCountBtn>
          </StCountGuest>
          <StCountGuest>
            <div>
              유아<div>2세 미만</div>
            </div>
            <StCountBtn
              dimmed={!infant}
              btnType="circle"
              onClick={() => decreaseGuestCount('infant')}
            >
              <GoDash />
            </StCountBtn>
            <div>{infant}</div>
            <StCountBtn
              dimmed={infant >= 5}
              btnType="circle"
              onClick={() => increaseGuestCount('infant')}
            >
              <GoPlus />
            </StCountBtn>
          </StCountGuest>
        </ul>
        <StCapacityMsg>
          최대 {capacity}명. 유아는 숙박인원에 포함되지 않습니다.
        </StCapacityMsg>
        <StCloseBtn
          btnType="underlined"
          fontWeight="600"
          onClick={onClosePopup}
        >
          닫기
        </StCloseBtn>
      </StPopup>
    </StGuests>
  );
}