'use client'; import { Button, Card, Group, Modal, Stack, Text, TextInput, ThemeIcon, } from '@mantine/core'; import { useDisclosure } from '@mantine/hooks'; import { TbPlus } from 'react-icons/tb'; import { DEFAULT_OVERLAY_PROPS } from '@/styles/overlays'; import tileStyles from '../topicTile/TopicTile.module.css'; interface Props { value: string; onChangeValue: (value: string) => void; onSubmit: () => void; submitDisabled: boolean; description?: string; } export default function AddTopicTile(props: Props) { const [opened, handlers] = useDisclosure(false); const submit = () => { props.onSubmit(); handlers.close(); }; return ( <> Add your own
{ event.preventDefault(); if (props.submitDisabled) return; submit(); }} > props.onChangeValue(event.currentTarget.value) } />
); }