import React from "react";
import { defineComponent, useEvaluate } from "@qorebase/app-component";
import { Button } from "@chakra-ui/react";
import Datepicker from "react-datepicker";

export default defineComponent({
  name: "Custom Component",
  type: "none",
  icon: "none",
  group: "text",
  defaultProps: {
    title: "This is a title",
  },
  propDefinition: {
    title: { group: "Text", type: "expression", options: {} },
  },
  Component: (props) => {
    const title = useEvaluate(props.properties.title);

    return <Button>{title}</Button>;
  },
});
