type RichTextBasis = {
  type: string
  content: string
  css ?: string
}

export type RichTextPlain = RichTextBasis & {
  type: 'plain'
}

export type RichTextParagraph = Omit<RichTextBasis, 'content'> & {
  type: 'p'
  children ?: RichText[]
}

export type RichTextSpan = RichTextBasis & {
  type: 'span'
}

export type RichTextLink = RichTextBasis & {
  type: 'a'
  href: string
  target ?: string
}

export type RichTextNewLine = {
  type: 'br'
}

export type RichText = RichTextPlain | RichTextParagraph |  RichTextSpan | RichTextLink | RichTextNewLine