Untitled

mail@pastecode.io avatar
unknown
plain_text
23 days ago
848 B
3
Indexable
Never
'use client'

import { useState } from "react";

import { Container, Grid, TextField } from "@mui/material";

interface ManageEventProps {
  title: string;
  description: string;
}

const ManageEvent = ({ eventData }) => {
  const [event, setEvent] = useState<ManageEventProps>(eventData);

  return (
    <Container>
      <Grid container>
        <Grid item xs={4}>
          <TextField
            label="Title"
            value={event.title}
            onChange={(e) => setEvent({ ...event, title: e.target.value })}
          />
        </Grid>
        <Grid item xs={8}>
          <TextField
            label="Description"
            value={event.description}
            onChange={(e) => setEvent({ ...event, description: e.target.value })}
          />
        </Grid>
      </Grid>
    </Container>
  );
}

export default ManageEvent;
Leave a Comment