import { useMantineTheme, Modal, Paper, Center, Group, TextInput, Image, Button, Select, AspectRatio, Box, Text, Grid, } from '@mantine/core'; import { useForm } from '@mantine/hooks'; import { motion } from 'framer-motion'; import { useState } from 'react'; import { Apps } from 'tabler-icons-react'; import { ServiceTypes } from './AppShelf.d'; export default function AddItemShelfItem(props: any) { const { additem: addItem } = props; const [opened, setOpened] = useState(false); const theme = useMantineTheme(); const form = useForm({ initialValues: { type: 'Other', name: '', icon: '', url: '', }, validationRules: {}, }); return ( <> setOpened(false)} title="Add a service" >
Placeholder
{ addItem(form.values); setOpened(false); form.reset(); })} > form.setFieldValue('name', event.currentTarget.value)} error={form.errors.name && 'Invalid name'} /> { form.setFieldValue('icon', event.currentTarget.value); }} error={form.errors.icon && 'Icon url is invalid'} /> form.setFieldValue('url', event.currentTarget.value)} error={form.errors.icon && 'Icon url is invalid'} />