-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Refactor/#483] 플로팅 버튼 디자인 수정
- Loading branch information
Showing
7 changed files
with
137 additions
and
77 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import type { SVGProps } from "react"; | ||
const SvgIconTicket = (props: SVGProps<SVGSVGElement>) => ( | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 30 30" {...props}> | ||
<g filter="url(#icon_ticket_svg__a)"> | ||
<path | ||
fill="#fff" | ||
fillOpacity={0.6} | ||
fillRule="evenodd" | ||
d="M9.219 17.09c.612.212.925.917.697 1.575-.113.329-.031.82.297.933l14.051 4.846a.77.77 0 0 0 .978-.476l3.423-9.925a.77.77 0 0 0-.477-.978L13.586 8.03h-.002c-.184.536-.668.876-1.172.87l-.004.003a.004.004 0 0 1-.006.003l-.015-.005-.006-.001a1.1 1.1 0 0 1-.317-.06c-.612-.21-.924-.916-.697-1.574l-.001-.002-4.48-1.545a.77.77 0 0 0-.978.476L2.485 16.12a.77.77 0 0 0 .477.979l3.928 1.354c.328.113.696-.223.809-.551.227-.659.907-1.021 1.52-.81m.385-.796a.24.24 0 0 1-.15-.306l.165-.478a.241.241 0 1 1 .456.158l-.164.477a.24.24 0 0 1-.307.15m.644-1.866a.24.24 0 0 1-.15-.307l.165-.477a.241.241 0 0 1 .456.157l-.165.477a.24.24 0 0 1-.306.15m.643-1.867a.24.24 0 0 1-.15-.306l.165-.477a.241.241 0 0 1 .456.157l-.164.477a.24.24 0 0 1-.307.15m.644-1.866a.24.24 0 0 1-.15-.306l.165-.478a.241.241 0 1 1 .456.158l-.165.477a.24.24 0 0 1-.306.15" | ||
clipRule="evenodd" | ||
/> | ||
</g> | ||
<defs> | ||
<filter | ||
id="icon_ticket_svg__a" | ||
width={26.266} | ||
height={18.81} | ||
x={2.441} | ||
y={5.677} | ||
colorInterpolationFilters="sRGB" | ||
filterUnits="userSpaceOnUse" | ||
> | ||
<feFlood floodOpacity={0} result="BackgroundImageFix" /> | ||
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape" /> | ||
<feColorMatrix | ||
in="SourceAlpha" | ||
result="hardAlpha" | ||
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" | ||
/> | ||
<feOffset /> | ||
<feGaussianBlur stdDeviation={1.538} /> | ||
<feComposite in2="hardAlpha" k2={-1} k3={1} operator="arithmetic" /> | ||
<feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0" /> | ||
<feBlend in2="shape" result="effect1_innerShadow_8242_17346" /> | ||
</filter> | ||
</defs> | ||
</svg> | ||
); | ||
export default SvgIconTicket; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,56 @@ | ||
import { BtnFloating, Union } from "@assets/svgs"; | ||
import styled, { keyframes } from "styled-components"; | ||
|
||
const float = keyframes` | ||
0% { | ||
transform: translateY(0); | ||
} | ||
50% { | ||
transform: translateY(-10px); | ||
} | ||
100% { | ||
transform: translateY(0); | ||
} | ||
`; | ||
import { IconTicket } from "@assets/svgs"; | ||
import styled, { css } from "styled-components"; | ||
|
||
export const Layer = styled.section<{ $width: number }>` | ||
position: fixed; | ||
bottom: 15rem; | ||
left: ${({ $width }) => `${$width / 2 + 50}px`}; | ||
bottom: 12rem; | ||
left: ${({ $width }) => `${$width / 2 + Math.min(375 / 2, $width / 2) - 24}px`}; | ||
z-index: 25; | ||
`; | ||
|
||
export const FloatingWrapper = styled.section` | ||
position: absolute; | ||
display: flex; | ||
flex-direction: column; | ||
animation: ${float} 2s ease-in-out infinite; | ||
`; | ||
|
||
export const FloatingContainer = styled.section` | ||
export const FloatingBtnWrapper = styled.button<{ $showText: boolean }>` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 0.8rem; | ||
`; | ||
background-color: ${({ theme }) => theme.colors.pink_400}; | ||
padding: 1rem; | ||
border-radius: 50px; | ||
overflow: hidden; | ||
cursor: pointer; | ||
box-shadow: 0px 0px 26px 0px rgba(251, 36, 127, 0.6); | ||
transition: all 0.3s ease-in-out; | ||
export const UnionIcon = styled(Union)` | ||
width: 10.3rem; | ||
height: 3rem; | ||
margin-right: 2rem; | ||
`; | ||
|
||
export const UnionText = styled.div` | ||
position: absolute; | ||
top: 0.55rem; | ||
left: 0.6rem; | ||
z-index: 30; | ||
display: flex; | ||
color: ${({ theme }) => theme.colors.pink_400}; | ||
${({ theme }) => theme.fonts["caption2-semi"]}; | ||
`; | ||
|
||
export const FloatingBtnWrapper = styled.button` | ||
display: flex; | ||
width: 6.4rem; | ||
height: 6.4rem; | ||
margin-left: 5.4rem; | ||
`; | ||
|
||
export const FloatingBtn = styled(BtnFloating)` | ||
width: 6.4rem; | ||
height: 6.4rem; | ||
right: 0; | ||
width: ${({ $showText }) => ($showText ? "12.7rem" : "5.2rem")}; | ||
`; | ||
|
||
export const FloatingText = styled.p<{ $showText: boolean }>` | ||
${({ theme }) => theme.fonts["body1-normal-semi"]}; | ||
color: ${({ theme }) => theme.colors.white}; | ||
white-space: nowrap; | ||
${({ $showText }) => | ||
$showText | ||
? css` | ||
transform: translateX(0); | ||
transition: | ||
transform 0.3s ease-in-out, | ||
opacity 0.3s ease-in-out; | ||
opacity: 1; | ||
` | ||
: css` | ||
transform: translateX(50%); | ||
transition: | ||
transform 0.3s ease-in-out, | ||
opacity 0.3s ease-in-out; | ||
opacity: 0; | ||
`} | ||
`; | ||
|
||
export const TicketIcon = styled(IconTicket)` | ||
width: 3rem; | ||
height: 3rem; | ||
flex-shrink: 0; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters