summaryrefslogtreecommitdiffstats
path: root/src/components/Buttons/Button
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-29 17:52:21 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-29 18:01:06 +0100
commit8e0c8c9255ba5ab466d8372fe223efeb5a3f0833 (patch)
tree67102c4c0776f83c8f845266728cb4099a14b41a /src/components/Buttons/Button
parent76c01d51ccbdd0faaf12b624328a40ef24f33f88 (diff)
chore: replace read more link with ButtonLink component
I also fix the load more button position since I removed the margin auto.
Diffstat (limited to 'src/components/Buttons/Button')
-rw-r--r--src/components/Buttons/Button/Button.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/Buttons/Button/Button.tsx b/src/components/Buttons/Button/Button.tsx
index 8256e6b..80acf8d 100644
--- a/src/components/Buttons/Button/Button.tsx
+++ b/src/components/Buttons/Button/Button.tsx
@@ -1,19 +1,24 @@
+import { ButtonPosition } from '@ts/types/app';
import { ReactNode } from 'react';
import styles from '../Buttons.module.scss';
const Button = ({
children,
clickHandler,
+ position = 'left',
isDisabled = false,
isPrimary = false,
}: {
children: ReactNode;
clickHandler: any;
+ position?: ButtonPosition;
isDisabled?: boolean;
isPrimary?: boolean;
}) => {
const classes = `${styles.btn} ${
- isPrimary ? styles.primary : styles.secondary
+ isPrimary
+ ? `${styles.primary} ${styles[`primary--${position}`]}`
+ : `${styles.secondary} ${styles[`secondary--${position}`]}`
}`;
return (