summaryrefslogtreecommitdiffstats
path: root/src/components/Buttons/Button/Button.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Buttons/Button/Button.tsx')
-rw-r--r--src/components/Buttons/Button/Button.tsx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/Buttons/Button/Button.tsx b/src/components/Buttons/Button/Button.tsx
index 80acf8d..4d26ea4 100644
--- a/src/components/Buttons/Button/Button.tsx
+++ b/src/components/Buttons/Button/Button.tsx
@@ -15,11 +15,12 @@ const Button = ({
isDisabled?: boolean;
isPrimary?: boolean;
}) => {
- const classes = `${styles.btn} ${
- isPrimary
- ? `${styles.primary} ${styles[`primary--${position}`]}`
- : `${styles.secondary} ${styles[`secondary--${position}`]}`
- }`;
+ const primaryPosition = `primary--${position}`;
+ const secondaryPosition = `secondary--${position}`;
+ const typeStyles = isPrimary
+ ? `${styles.primary} ${styles[primaryPosition]}`
+ : `${styles.secondary} ${styles[secondaryPosition]}`;
+ const classes = `${styles.btn} ${typeStyles}`;
return (
<button