import { createAttrsForm } from "../../../defines/createAttrsForm";
import { createCompHooks } from "../../../defines/createCompHooks";
import { createCompId } from "../../../defines/createCompId";

export { Component } from "./component";

export const options = {
  name: "标题",
  thumbnail: require("./thumbnail.jpg"),
};

export const { createComp, useCompData } = createCompHooks({
  value: {},
  layout: {
    size: [750, 80],
  },
  children: {
    title: () =>
      createCompId("Text", {
        value: `<p style="text-align:center;"><span style="color:#333;font-size:20px;font-weight: bold;">产品信息</span></p>`,
        layout: {
          size: [300, 60],
        },
      }),
  },
});

export const Form = createAttrsForm([]);
