import { RichText, useBlockProps as blockProps } from '@wordpress/block-editor'; import classNames from 'classnames'; import { FooterType } from '../editor/components/FooterSelect'; import { HeaderType } from '../editor/components/HeaderSelect'; import { Attributes } from '../types'; import { fontFamilyLong, maybeClamp } from '../util/fonts'; import { CopyButton } from './CopyButton'; import './style.css'; export const BlockOutput = ({ attributes }: { attributes: Attributes }) => (
1 ? attributes.startingLineNumber : undefined, '--cbp-line-number-width': attributes.lineNumbersWidth ? `${attributes.lineNumbersWidth}px` : undefined, '--cbp-line-highlight-color': attributes?.enableHighlighting ? attributes.lineHighlightColor : undefined, lineHeight: maybeClamp( attributes.lineHeight, attributes.clampFonts, ), } as React.CSSProperties }> {attributes.code?.length > 0 ? ( <> {attributes.copyButton && ( )} ) : null}
);