mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
🎨 styles: button size small
:%s
This commit is contained in:
@@ -103,6 +103,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
&.small {
|
||||
.inner {
|
||||
padding: .5rem 1rem;
|
||||
&.onlyIcon {
|
||||
padding: 1rem;
|
||||
}
|
||||
@screen md {
|
||||
padding: .8rem 1.6rem;
|
||||
&.onlyIcon {
|
||||
padding: .8rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.large {
|
||||
.inner {
|
||||
|
@@ -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,
|
||||
|
@@ -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 (
|
||||
<ButtonCommon
|
||||
type={type}
|
||||
|
@@ -63,7 +63,7 @@ const ProductCard = ({
|
||||
{
|
||||
isSingleButton ?
|
||||
<div className={s.cardButton}>
|
||||
<ButtonCommon type="light" icon={<IconBuy />}>Add to cart</ButtonCommon>
|
||||
<ButtonCommon type="light" icon={<IconBuy />} size='small'>Add to cart</ButtonCommon>
|
||||
</div>
|
||||
:
|
||||
<>
|
||||
@@ -71,7 +71,7 @@ const ProductCard = ({
|
||||
<ButtonIconBuy/>
|
||||
</div>
|
||||
<div className={s.cardButton}>
|
||||
<ButtonCommon type="light">{buttonText}</ButtonCommon>
|
||||
<ButtonCommon type="light" size='small'>{buttonText}</ButtonCommon>
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
|
Reference in New Issue
Block a user