component.tsx 558 B

1234567891011121314151617181920
  1. import { string } from "vue-types";
  2. import { useCompData } from ".";
  3. import { Text } from "../../../basicUI";
  4. import { createUIComp } from "../../../defines/createUIComp";
  5. export const Component = createUIComp({
  6. props: {
  7. compId: string().isRequired,
  8. },
  9. setup(props) {
  10. const { children } = useCompData(props.compId);
  11. return () => (
  12. <div class="flex flex-col items-center py-10px">
  13. <Text.Component class="" compId={children.title} />
  14. <Text.Component class="" compId={children.subtitle} />
  15. </div>
  16. );
  17. },
  18. });