-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature/BAR-244] 끄적이는 페이지 메모 작성시 하단으로 스크롤 이동 및 툴팁 적용 (#76)
* style(global): wordBreak 속성 값 변경 * feat(domain/저장하는): folder 쿼리스트링이 없는 경우, 현재 폴더 위치 표시 * feat(domain/끄적이는): 메모 작성시 스크롤 하단으로 이동 * fix(domain/끄적이는): 히스토리 카드 오래된 순으로 정렬 * refactor: TooltipButton 컴포넌트 적용 * refactor: 공통 Card 컴포넌트 적용 * style(Dropdown): scroll 제거 * style(Tooltip): 화살표 외곽 투명색으로 변경 * style(Folder): padding 값 수정 * style(domain/끄적이는): input maxWidth 수정 * fix(TooltipButton): 중복 button 태그 제거 * refactor(usePosition): useLayoutEffect 적용
- Loading branch information
Showing
25 changed files
with
206 additions
and
148 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { type HTMLAttributes, type PropsWithChildren } from 'react'; | ||
|
||
import Icon from '@components/Icon'; | ||
import Tooltip from '@components/Tooltip'; | ||
import { type Icons } from '@constants/icon'; | ||
import { COLORS } from '@styles/tokens'; | ||
|
||
import * as styles from './style.css'; | ||
|
||
interface TooltipButtonProps extends HTMLAttributes<HTMLButtonElement> { | ||
isActive?: boolean; | ||
icon?: Icons; | ||
content: string; | ||
} | ||
|
||
const TooltipButton = ({ | ||
children, | ||
isActive = false, | ||
icon, | ||
content, | ||
...props | ||
}: PropsWithChildren<TooltipButtonProps>) => { | ||
return ( | ||
<Tooltip placement="top-center"> | ||
<Tooltip.Trigger {...props}> | ||
{icon ? ( | ||
<Icon | ||
icon={icon} | ||
className={styles.hover} | ||
color={isActive ? COLORS['Blue/Default'] : COLORS['Grey/300']} | ||
/> | ||
) : ( | ||
<>{children}</> | ||
)} | ||
</Tooltip.Trigger> | ||
<Tooltip.Content>{content}</Tooltip.Content> | ||
</Tooltip> | ||
); | ||
}; | ||
|
||
export default TooltipButton; |
11 changes: 11 additions & 0 deletions
11
src/components/Button/components/TooltipButton/style.css.ts
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,11 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
|
||
import { COLORS } from '@styles/tokens'; | ||
|
||
export const hover = style({ | ||
transition: 'fill 100ms ease-in-out', | ||
|
||
':hover': { | ||
fill: COLORS['Grey/600'], | ||
}, | ||
}); |
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
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
Oops, something went wrong.