diff --git a/components/Button/Button.js b/components/Button/Button.js
index 0121095..e56b77d 100644
--- a/components/Button/Button.js
+++ b/components/Button/Button.js
@@ -1,5 +1,5 @@
import classNames from 'classnames';
-
+import CoolHover from '../CoolHover/CoolHover';
import styles from './Button.module.css';
/**
@@ -16,10 +16,21 @@ import styles from './Button.module.css';
*/
export default function Button(ctx) {
- const { children, className, isPrimary, isIcon, onClick } = ctx;
+ const { children, className, isPrimary, isIcon, onClick, style } = ctx;
return (
-
+
+
+
);
}
diff --git a/components/Button/Button.module.css b/components/Button/Button.module.css
index 2277e8e..66e1f80 100644
--- a/components/Button/Button.module.css
+++ b/components/Button/Button.module.css
@@ -1,6 +1,6 @@
.button {
appearance: none;
- background: var(--bg-shade-3);
+ background: none;
color: var(--text-shade-3);
border: 0;
border-radius: 6px;
@@ -18,13 +18,9 @@
}
.button:hover {
- background: var(--bg-shade-3-5);
-}
-
-.button.primary {
- background: var(--accent-shade-0);
+ box-shadow: 0 0 0 1px var(--bg-shade-4) inset;
}
.button.primary:hover {
- background: var(--accent-shade-1);
+ box-shadow: 0 0 0 1px var(--accent-shade-3) inset;
}
diff --git a/components/CoolHover/CoolHover.js b/components/CoolHover/CoolHover.js
new file mode 100644
index 0000000..c7192e4
--- /dev/null
+++ b/components/CoolHover/CoolHover.js
@@ -0,0 +1,49 @@
+import { useState } from 'react';
+import styles from './CoolHover.module.css';
+import classNames from 'classnames';
+
+/**
+ * A reusable component to make a cool hover effect.
+ *
+ * @param {string} hoverColor - The hover color.
+ * @param {string} bgColor - The background color.
+ * @param {string} radius - The radius of the hover effect.
+ *
+ * @example
+ *
+ *
+ * Click for Pizza
+ *
+ *
+ *
+ */
+
+export default function CoolHover(ctx) {
+ const { hoverColor, bgColor, children, className, radius, style } = ctx;
+
+ const [ pos, setPos ] = useState({ x: 0, y: 0 });
+ const [ active, setActive ] = useState( false );
+
+ return (
+
{
+ setActive(true);
+ setPos({ x: e.nativeEvent.offsetX, y: e.nativeEvent.offsetY });
+ }}
+ onMouseLeave={() => setActive(false)}
+ >
+ { children }
+
+ );
+}
diff --git a/components/CoolHover/CoolHover.module.css b/components/CoolHover/CoolHover.module.css
new file mode 100644
index 0000000..e8304c2
--- /dev/null
+++ b/components/CoolHover/CoolHover.module.css
@@ -0,0 +1,3 @@
+.coolHover * {
+ pointer-events: none;
+}
\ No newline at end of file