link.tsx 426 B

1234567891011121314151617
  1. "use client";
  2. import type { ComponentRenderProps } from "./types";
  3. import { baseClass, getCustomClass } from "./utils";
  4. export function Link({ element }: ComponentRenderProps) {
  5. const { props } = element;
  6. const customClass = getCustomClass(props);
  7. return (
  8. <span
  9. className={`text-xs text-blue-500 underline cursor-pointer ${baseClass} ${customClass}`}
  10. >
  11. {props.label as string}
  12. </span>
  13. );
  14. }