From 9a49fbb7473b568c50cd635ca2525311dde6e8fa Mon Sep 17 00:00:00 2001 From: ajnart Date: Tue, 17 May 2022 01:43:40 +0200 Subject: [PATCH] :lipstick: Update AppShelf UI --- src/components/AppShelf/AppShelf.tsx | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/components/AppShelf/AppShelf.tsx b/src/components/AppShelf/AppShelf.tsx index 76ec5df39..bcc3024d5 100644 --- a/src/components/AppShelf/AppShelf.tsx +++ b/src/components/AppShelf/AppShelf.tsx @@ -1,13 +1,32 @@ import React, { useState } from 'react'; import { motion } from 'framer-motion'; -import { Text, AspectRatio, Card, Image, useMantineTheme, Center, Grid } from '@mantine/core'; +import { + Text, + AspectRatio, + Card, + Image, + useMantineTheme, + Center, + Grid, + createStyles, +} from '@mantine/core'; import { useConfig } from '../../tools/state'; import { serviceItem } from '../../tools/types'; import AppShelfMenu from './AppShelfMenu'; +const useStyles = createStyles((theme) => ({ + item: { + transition: 'box-shadow 150ms ease, transform 100ms ease', + + '&:hover': { + boxShadow: `${theme.shadows.md} !important`, + transform: 'scale(1.05)', + }, + }, +})); + const AppShelf = (props: any) => { const { config } = useConfig(); - return ( {config.services.map((service) => ( @@ -22,7 +41,7 @@ const AppShelf = (props: any) => { export function AppShelfItem(props: any) { const { service }: { service: serviceItem } = props; const [hovering, setHovering] = useState(false); - const theme = useMantineTheme(); + const { classes, theme } = useStyles(); return ( - + {service.name}