diff --git a/src/App.tsx b/src/App.tsx index f89616c..0d15998 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -12,8 +12,9 @@ export default function App() { return ( -
+
+ {/* */} Carpi Logo
diff --git a/src/components/Button.tsx b/src/components/Button.tsx index b82f912..ca1bfe8 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -6,7 +6,8 @@ interface ButtonProps { onClick?: () => void; children: ReactNode; tooltip: string; - inverted?: boolean; // Optional prop to invert colors + inverted?: boolean; + customStyles?: string; } export default function Button({ @@ -14,16 +15,18 @@ export default function Button({ children, tooltip, inverted, + customStyles = "", }: ButtonProps) { return ( -
+
+ + + + ); + + const mobileRadialButtons = [ + { + id: "export", + component: ( + + ), + }, + { + id: "discord", + component: ( + + ), + }, + { + id: "import", + component: ( + + ), + }, + { + id: "github", + component: ( + + ), + }, + { + id: "reset", + component: ( + + ), + }, + ]; + return ( <> -
-
{buttonList}
-
- +
+ {/* DESKTOP */} +
+ {mainButtons} +
+ {socialButtons} +
+ {/* MOBILE */} +
- {isOpen && ( - - {buttonList} - - )} + {isOpen && + mobileRadialButtons.map((btn, index) => { + // Number of pixels the buttons push outwards + const RADIUS = index % 2 === 0 ? 60 : 105; + const START_ANGLE = 80; + const END_ANGLE = 190; + + // Calculate the specific angle for this button + const angleDeg = + START_ANGLE + + index * + ((END_ANGLE - START_ANGLE) / + (mobileRadialButtons.length - 1)); + const angleRad = angleDeg * (Math.PI / 180); + + // Convert angle & radius into X and Y coordinate offsets + const x = RADIUS * Math.cos(angleRad); + const y = RADIUS * Math.sin(angleRad); + + return ( + + {btn.component} + + ); + })} + + + +
+ {/* RESET DIALOG */}