import React from 'react' import cx from 'classnames' import { HeadingLink } from 'components/article/HeadingLink' import { BreakingChangesT } from 'components/graphql/types' import styles from 'components/ui/MarkdownContent/MarkdownContent.module.scss' type Props = { schema: BreakingChangesT } export function BreakingChanges({ schema }: Props) { const changes = Object.keys(schema).map((date) => { const items = schema[date] const heading = `Changes scheduled for ${date}` return (
{heading} {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}
}