import React from 'react' import cx from 'classnames' import { HeadingLink } from '@/frame/components/article/HeadingLink' import { BreakingChangesT } from './types' import styles from '@/frame/components/ui/MarkdownContent/MarkdownContent.module.scss' export type HeadingT = { title: string slug: string } type Props = { schema: BreakingChangesT headings: Record } export function BreakingChanges({ schema, headings }: Props) { const changes = Object.keys(schema).map((date) => { const items = schema[date] const { title, slug } = headings[date] return (
{title} {items.map((item) => { const criticalityStyles = item.criticality === 'breaking' ? 'color-border-danger color-bg-danger' : 'color-border-accent-emphasis color-bg-accent' const criticality = item.criticality === 'breaking' ? 'Breaking' : 'Dangerous' return ( ) })}
) }) return
{changes}
}