Skip to content

Commit

Permalink
feat: tooltip PR 내용 반영#439 참고
Browse files Browse the repository at this point in the history
  • Loading branch information
김성욱 authored and 김성욱 committed Jan 2, 2024
1 parent c9e24d6 commit 7548eb7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
23 changes: 20 additions & 3 deletions app/src/@shared/ui-kit/Tooltip/IconTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,26 @@ export const IconTooltip = ({
text,
});

const Icon = type === 'info' ? MdInfo : MdWarning;
const iconColor =
type === 'info' ? theme.colors.mono.gray500 : theme.colors.semantic.warning;
const Icon = (() => {
switch (type) {
case 'info':
return MdInfo;
case 'warning':
return MdWarning;
default:
return MdInfo;
}
})();
const iconColor = (() => {
switch (type) {
case 'info':
return theme.colors.mono.gray500;
case 'warning':
return theme.colors.semantic.warning;
default:
return theme.colors.mono.gray500;
}
})();

return (
<Layout onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>
Expand Down
2 changes: 1 addition & 1 deletion app/src/@shared/ui-kit/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Tooltip = () => {

return (
<Layout
hover={ref ? true : false}
hover={ref !== null}
position={position}
top={top}
left={left}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const DailyActivityTable = ({

return (
<ScrollXArea ref={scrollAreaRef}>
<HStack style={{ marginRight: '5rem' }} ref={tableWithHeaderRef}>
<HStack ref={tableWithHeaderRef}>
<DailyActivityTableDayOfWeekHeader />
<VStack align="start">
<DailyActivityTableHeader
Expand Down

0 comments on commit 7548eb7

Please sign in to comment.