diff --git a/src/components/common/ButtonCommon/ButtonCommon.module.scss b/src/components/common/ButtonCommon/ButtonCommon.module.scss index a0c33947d..32cf65655 100644 --- a/src/components/common/ButtonCommon/ButtonCommon.module.scss +++ b/src/components/common/ButtonCommon/ButtonCommon.module.scss @@ -103,6 +103,20 @@ } } } + &.small { + .inner { + padding: .5rem 1rem; + &.onlyIcon { + padding: 1rem; + } + @screen md { + padding: .8rem 1.6rem; + &.onlyIcon { + padding: .8rem; + } + } + } + } &.large { .inner { diff --git a/src/components/common/ButtonCommon/ButtonCommon.tsx b/src/components/common/ButtonCommon/ButtonCommon.tsx index 965e9519e..d83621d30 100644 --- a/src/components/common/ButtonCommon/ButtonCommon.tsx +++ b/src/components/common/ButtonCommon/ButtonCommon.tsx @@ -5,7 +5,7 @@ import s from './ButtonCommon.module.scss' interface Props { children?: React.ReactNode, type?: 'primary' | 'light' | 'ghost' | 'lightBorderNone', - size?: 'default' | 'large', + size?: 'default' | 'large' | 'small', icon?: React.ReactNode, isIconSuffix?: boolean, loading?: boolean, diff --git a/src/components/common/ButtonIconBuy/ButtonIconBuy.tsx b/src/components/common/ButtonIconBuy/ButtonIconBuy.tsx index c1209c1f8..c93b8ca6f 100644 --- a/src/components/common/ButtonIconBuy/ButtonIconBuy.tsx +++ b/src/components/common/ButtonIconBuy/ButtonIconBuy.tsx @@ -4,13 +4,13 @@ import ButtonCommon from '../ButtonCommon/ButtonCommon' interface Props { type?: 'primary' | 'light' | 'ghost', - size?: 'default' | 'large', + size?: 'default' | 'large' | 'small', loading?: boolean, disabled?: boolean, onClick?: () => void, } -const ButtonIconBuy = memo(({ type = 'light', size = 'default', loading = false, disabled, onClick }: Props) => { +const ButtonIconBuy = memo(({ type = 'light', size = 'small', loading = false, disabled, onClick }: Props) => { return ( - }>Add to cart + } size='small'>Add to cart : <>
- +
- {buttonText} + {buttonText}
} diff --git a/src/components/common/QuanittyInput/QuanittyInput.module.scss b/src/components/common/QuanittyInput/QuanittyInput.module.scss index d8a0e5fc1..7609ad10d 100644 --- a/src/components/common/QuanittyInput/QuanittyInput.module.scss +++ b/src/components/common/QuanittyInput/QuanittyInput.module.scss @@ -1,10 +1,23 @@ @import '../../../styles/utilities'; -.quanittyInputWarper{ - border-color: theme("textColor.active"); - @apply border border-solid inline-flex justify-between items-center custom-border-radius; +.quanittyInputWarper { + @apply shape-common-border; + &::before{ + height: 100%; + top: 1px; + background-color: var(--text-active); + } + .inner { + @apply inline-flex justify-between items-center; + margin: 0; + } .plusIcon, .minusIcon{ + @apply flex justify-center items-center; + min-height: 2rem; &:hover{ cursor: pointer; + svg path { + fill: var(--primary); + } } } &.default{ diff --git a/src/components/common/QuanittyInput/QuanittyInput.tsx b/src/components/common/QuanittyInput/QuanittyInput.tsx index 20baba9ea..e31abb880 100644 --- a/src/components/common/QuanittyInput/QuanittyInput.tsx +++ b/src/components/common/QuanittyInput/QuanittyInput.tsx @@ -4,8 +4,8 @@ import classNames from 'classnames' import { IconMinus, IconPlus } from '../../icons' interface QuanittyInputProps extends Omit< - React.InputHTMLAttributes, - 'onChange' | 'min' | 'max' | 'step' | "type" | "size" + React.InputHTMLAttributes, + 'onChange' | 'min' | 'max' | 'step' | "type" | "size" > { size?: 'default' | 'small' onChange?: (value: number) => void @@ -63,18 +63,20 @@ const QuanittyInput = ({ return (
-
- -
- -
- +
+
+ +
+ +
+ +
) diff --git a/src/components/icons/IconMinus.tsx b/src/components/icons/IconMinus.tsx index abf3a2907..6e572412a 100644 --- a/src/components/icons/IconMinus.tsx +++ b/src/components/icons/IconMinus.tsx @@ -1,14 +1,14 @@ -const IconMinus = ({ ...props }) => { +const IconMinus = () => { return ( diff --git a/src/components/icons/IconPlus.tsx b/src/components/icons/IconPlus.tsx index 63d6d2dd4..634027c4e 100644 --- a/src/components/icons/IconPlus.tsx +++ b/src/components/icons/IconPlus.tsx @@ -1,14 +1,14 @@ -const IconPlus = ({ ...props }) => { +const IconPlus = () => { return ( diff --git a/src/styles/_utilities.scss b/src/styles/_utilities.scss index 5ce5f24af..8abfb0104 100644 --- a/src/styles/_utilities.scss +++ b/src/styles/_utilities.scss @@ -114,8 +114,6 @@ .shape-common { position: relative; - $border: 2px; - margin: $border; clip-path: url(#svg-custom-shape); }