diff --git a/src/components/AppShelf/AddAppShelfItem.tsx b/src/components/AppShelf/AddAppShelfItem.tsx index 5f42d2af2..c47287dd4 100644 --- a/src/components/AppShelf/AddAppShelfItem.tsx +++ b/src/components/AppShelf/AddAppShelfItem.tsx @@ -25,7 +25,7 @@ export default function AddItemShelfItem(props: any) { <> setOpened(false)} title="Add a service" diff --git a/src/components/AppShelf/AppShelf.story.tsx b/src/components/AppShelf/AppShelf.story.tsx index 610f1370c..928510aac 100644 --- a/src/components/AppShelf/AppShelf.story.tsx +++ b/src/components/AppShelf/AppShelf.story.tsx @@ -1,3 +1,4 @@ +import { SimpleGrid } from '@mantine/core'; import AppShelf, { AppShelfItem } from './AppShelf'; export default { @@ -16,3 +17,10 @@ export default { export const Default = (args: any) => ; export const One = (args: any) => ; +export const Ten = (args: any) => ( + + {Array.from(Array(10)).map((_, i) => ( + + ))} + +); diff --git a/src/components/AppShelf/AppShelf.tsx b/src/components/AppShelf/AppShelf.tsx index af5f85340..4f8032cf4 100644 --- a/src/components/AppShelf/AppShelf.tsx +++ b/src/components/AppShelf/AppShelf.tsx @@ -1,9 +1,8 @@ import React, { useState } from 'react'; import { motion } from 'framer-motion'; -import { Text, AspectRatio, SimpleGrid, Card, Image, Group, Space } from '@mantine/core'; +import { Text, AspectRatio, SimpleGrid, Card, Center, Image, useMantineTheme } from '@mantine/core'; import { useConfig } from '../../tools/state'; import { serviceItem } from '../../tools/types'; -import AddItemShelfItem from './AddAppShelfItem'; import { AppShelfItemWrapper } from './AppShelfItemWrapper'; import AppShelfMenu from './AppShelfMenu'; @@ -11,11 +10,19 @@ const AppShelf = () => { const { config } = useConfig(); return ( - + {config.services.map((service) => ( ))} - ); }; @@ -23,6 +30,7 @@ const AppShelf = () => { export function AppShelfItem(props: any) { const { service }: { service: serviceItem } = props; const [hovering, setHovering] = useState(false); + const theme = useMantineTheme(); return ( - + - - - + {service.name} - - - - + + + @@ -76,16 +79,12 @@ export function AppShelfItem(props: any) { onClick={() => { window.open(service.url); }} - style={{ - maxWidth: '50%', - marginBottom: 10, - }} src={service.icon} /> - + ); } diff --git a/src/components/AppShelf/AppShelfItemWrapper.tsx b/src/components/AppShelf/AppShelfItemWrapper.tsx index a305661e6..ffe409062 100644 --- a/src/components/AppShelf/AppShelfItemWrapper.tsx +++ b/src/components/AppShelf/AppShelfItemWrapper.tsx @@ -8,10 +8,6 @@ export function AppShelfItemWrapper(props: any) { style={{ boxShadow: hovering ? '0px 0px 3px rgba(0, 0, 0, 0.5)' : '0px 0px 1px rgba(0, 0, 0, 0.5)', backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1], - - //TODO: #3 Fix this temporary fix and make the width and height dynamic / responsive - width: 200, - height: 180, }} radius="md" > diff --git a/src/components/layout/Navbar.tsx b/src/components/layout/Navbar.tsx index 2f9b26f0b..a8ff679a0 100644 --- a/src/components/layout/Navbar.tsx +++ b/src/components/layout/Navbar.tsx @@ -6,7 +6,7 @@ export default function Navbar() { return (