PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
← All changes | src/front/BlockOutput.tsx +11 -1 1.7.01.13.0 View file →
@@ -1,8 +1,9 @@
1 1 import { RichText, useBlockProps as blockProps } from '@wordpress/block-editor';
2 2 import classNames from 'classnames';
3 -import { colord, AnyColor } from 'colord';
3 +import { FooterType } from '../editor/components/FooterSelect';
4 4 import { HeaderType } from '../editor/components/HeaderSelect';
5 +import { SeeMoreType } from '../editor/components/SeeMoreSelect';
5 6 import { Attributes } from '../types';
6 7 import { fontFamilyLong, maybeClamp } from '../util/fonts';
7 8 import { CopyButton } from './CopyButton';
8 9 import './style.css';
@@ -11,9 +12,13 @@
11 12 <div
12 13 {...blockProps.save({
13 14 className: classNames({
14 15 'padding-disabled': attributes.disablePadding,
16 + 'padding-bottom-disabled':
17 + attributes?.footerType && attributes?.footerType !== 'none',
15 18 'cbp-has-line-numbers': attributes.lineNumbers,
19 + 'cbp-blur-enabled': attributes.enableBlurring,
20 + 'cbp-unblur-on-hover': attributes.removeBlurOnHover,
16 21 }),
17 22 })}
18 23 data-code-block-pro-font-family={attributes.fontFamily}
19 24 style={
@@ -33,8 +38,11 @@
33 38 : undefined,
34 39 '--cbp-line-number-width': attributes.lineNumbersWidth
35 40 ? `${attributes.lineNumbersWidth}px`
36 41 : undefined,
42 + '--cbp-line-highlight-color': attributes?.enableHighlighting
43 + ? attributes.lineHighlightColor
44 + : undefined,
37 45 lineHeight: maybeClamp(
38 46 attributes.lineHeight,
39 47 attributes.clampFonts,
40 48 ),
@@ -46,8 +54,10 @@
46 54 {attributes.copyButton && (
47 55 <CopyButton attributes={attributes} />
48 56 )}
49 57 <RichText.Content value={attributes.codeHTML} />
58 + <FooterType {...attributes} />
59 + <SeeMoreType {...attributes} />
50 60 </>
51 61 ) : null}
52 62 </div>
53 63 );