diff --git a/pages/index.tsx b/pages/index.tsx index 0c3c32d2a..1cf2dbf29 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,5 +1,5 @@ -import { ButtonCommon, Inputcommon, InputSearch, Layout } from 'src/components/common'; +import { ButtonCommon, ButtonIconBuy, Inputcommon, InputSearch, Layout } from 'src/components/common'; import { IconBuy } from 'src/components/icons'; export default function Home() { return ( @@ -17,9 +17,7 @@ export default function Home() { }>Button - - }/> - } size='large'/> + ) } diff --git a/src/components/common/ButtonIconBuy/ButtonIconBuy.tsx b/src/components/common/ButtonIconBuy/ButtonIconBuy.tsx new file mode 100644 index 000000000..c1209c1f8 --- /dev/null +++ b/src/components/common/ButtonIconBuy/ButtonIconBuy.tsx @@ -0,0 +1,26 @@ +import React, { memo } from 'react' +import { IconBuy } from 'src/components/icons' +import ButtonCommon from '../ButtonCommon/ButtonCommon' + +interface Props { + type?: 'primary' | 'light' | 'ghost', + size?: 'default' | 'large', + loading?: boolean, + disabled?: boolean, + onClick?: () => void, +} + +const ButtonIconBuy = memo(({ type = 'light', size = 'default', loading = false, disabled, onClick }: Props) => { + return ( + } + /> + ) +}) + +export default ButtonIconBuy diff --git a/src/components/common/index.ts b/src/components/common/index.ts index 22bb3c537..916660192 100644 --- a/src/components/common/index.ts +++ b/src/components/common/index.ts @@ -6,3 +6,4 @@ export { default as ItemWishList} from './ItemWishList/ItemWishList' export { default as Logo} from './Logo/Logo' export { default as Inputcommon} from './InputCommon/InputCommon' export { default as InputSearch} from './InputSearch/InputSearch' +export { default as ButtonIconBuy} from './ButtonIconBuy/ButtonIconBuy'