AppShelf adjustments

This commit is contained in:
ajnart
2022-11-22 13:58:50 +09:00
parent e2041421f6
commit 195e1ba946
2 changed files with 45 additions and 111 deletions

View File

@@ -31,7 +31,7 @@ const useStyles = createStyles((theme) => ({
},
}));
export function SortableAppShelfItem(props: any) {
export function SortableItem(props: any) {
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({
id: props.id,
});
@@ -43,7 +43,7 @@ export function SortableAppShelfItem(props: any) {
return (
<div ref={setNodeRef} style={style} {...attributes} {...listeners}>
<AppShelfItem service={props.service} />
{props.children}
</div>
);
}
@@ -75,6 +75,8 @@ export function AppShelfItem(props: any) {
shadow="md"
className={classes.item}
style={{
// Use the grab cursor when hovering over the card
cursor: hovering ? 'grab' : 'auto',
background: `rgba(${colorScheme === 'dark' ? '37, 38, 43,' : '255, 255, 255,'} \
${(config.settings.appOpacity || 100) / 100}`,
borderColor: `rgba(${colorScheme === 'dark' ? '37, 38, 43,' : '233, 236, 239,'} \
@@ -140,4 +142,4 @@ export function AppShelfItem(props: any) {
</Card>
</motion.div>
);
}
}