Likelion-YeungNam-Univ / 12th-BeginnerFit-FE

헬스/관리/운동 등에 무지한 사람들 위해 나에게 맞는 홈트 영상 추천/운동 종목 추천 해주는 서비스
http://43.201.203.128:5173/
3 stars 2 forks source link

bottomNav 구현 #10

Open tkv00 opened 1 month ago

tkv00 commented 1 month ago

코드

import * as React from "react";
import styled from "styled-components";
import { Link } from "react-router-dom";
import { GoHome } from "react-icons/go";
import { MdOutlineChat } from "react-icons/md";
import { FiUser } from "react-icons/fi";
import { responsiveSize } from "../utils/Mediaquery";

export default function BottomNav() {
  return (
    <BottomNavContainer>
      <div>
        {/* 메인이동 */}
        <Link to="/main">
          <StyledIcon as={GoHome} />
        </Link>
      </div>
      {/* 프로필 이동 */}
      <div>
        <Link>
          <StyledIcon as={FiUser} />
        </Link>
      </div>
      {/* 채팅이동 */}
      <div>
        <Link>
          <StyledIcon as={MdOutlineChat} />
        </Link>
      </div>
    </BottomNavContainer>
  );
}

//================================================================================

export const BottomNavContainer = styled.nav`
  width: 100%;
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  background-color: ${({ theme }) => theme.colors.black};
  height: ${responsiveSize("90")};
  bottom: 0;
  border-top-left-radius: ${responsiveSize("30")};
  border-top-right-radius: ${responsiveSize("30")};
  z-index: 1;
`;

const StyledIcon = styled.div`
  width: ${responsiveSize("48")};
  height: ${responsiveSize("48")};
  color: gray;
  transition: color 0.3s;

  &:hover {
    color: ${({ theme }) => theme.colors.lightpurple};
  }
`;

사용시 주의사항

yeongipark commented 1 month ago

감사합니다~