Skip to content

Commit

Permalink
Merge pull request #57 from SOPT-all/feat/#56/page-bottom-button-hover
Browse files Browse the repository at this point in the history
[FEAT] 페이지 하단 공통 버튼 호버 구현
  • Loading branch information
Taew00k authored Jan 14, 2025
2 parents 71dc1f6 + 373a881 commit 7bf543b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const PageBottomBtn = ({ btnText, size, isDisabled, onClick }: PageBottomBtnProp
});

return (
<button className={className} onClick={isDisabled ? undefined : onClick}>
<button className={className} onClick={isDisabled ? undefined : onClick} disabled={isDisabled}>
{btnText}
</button>
);
Expand Down
12 changes: 11 additions & 1 deletion src/components/common/button/pageBottom/pageBottomBtn.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { recipe } from '@vanilla-extract/recipes';
const bottomBtnStyle = recipe({
base: {
...theme.FONTS.h5Sb16,
color: theme.COLORS.white,
borderRadius: 8,
height: '5.2rem',
color: theme.COLORS.white,
},
variants: {
size: {
Expand All @@ -28,6 +28,16 @@ const bottomBtnStyle = recipe({
},
},
},
compoundVariants: [
{
variants: { isDisabled: false },
style: {
':hover': {
backgroundColor: theme.COLORS.primary600,
},
},
},
],
});

export default bottomBtnStyle;
2 changes: 1 addition & 1 deletion src/stories/pageBottomBtn.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PageBottomBtn from '@components/common/button/pageBottom/pageBottomBtn';
import PageBottomBtn from '@components/common/button/pageBottom/PageBottomBtn';
import type { Meta, StoryObj } from '@storybook/react';

interface PageBottomBtnProps {
Expand Down
2 changes: 1 addition & 1 deletion src/stories/pageBtn.stories.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import PageBtn from '@components/common/button/pageBtn/pageBtn';
import PageBtn from '@components/common/button/pageBtn/PageBtn';
import type { Meta, StoryObj } from '@storybook/react';

interface PageBtnProps {
Expand Down
1 change: 1 addition & 0 deletions src/styles/theme.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const theme = createGlobalTheme(':root', {

primary200: '#9FECAD',
primary400: '#65C677',
primary600: '#3EBD55',

green1: '#F7FFE9',
green2: '#D3ECD8',
Expand Down

0 comments on commit 7bf543b

Please sign in to comment.