| @@ -1,8 +1,9 @@ | ||
| 1 | 1 | import { RichText, useBlockProps as blockProps } from '@wordpress/block-editor'; |
| 2 | 2 | import classNames from 'classnames'; |
| 3 | 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'; |
| @@ -14,8 +15,10 @@ | ||
| 14 | 15 | 'padding-disabled': attributes.disablePadding, |
| 15 | 16 | 'padding-bottom-disabled': |
| 16 | 17 | attributes?.footerType && attributes?.footerType !== 'none', |
| 17 | 18 | 'cbp-has-line-numbers': attributes.lineNumbers, |
| 19 | + 'cbp-blur-enabled': attributes.enableBlurring, | |
| 20 | + 'cbp-unblur-on-hover': attributes.removeBlurOnHover, | |
| 18 | 21 | }), |
| 19 | 22 | })} |
| 20 | 23 | data-code-block-pro-font-family={attributes.fontFamily} |
| 21 | 24 | style={ |
| @@ -35,8 +38,11 @@ | ||
| 35 | 38 | : undefined, |
| 36 | 39 | '--cbp-line-number-width': attributes.lineNumbersWidth |
| 37 | 40 | ? `${attributes.lineNumbersWidth}px` |
| 38 | 41 | : undefined, |
| 42 | + '--cbp-line-highlight-color': attributes?.enableHighlighting | |
| 43 | + ? attributes.lineHighlightColor | |
| 44 | + : undefined, | |
| 39 | 45 | lineHeight: maybeClamp( |
| 40 | 46 | attributes.lineHeight, |
| 41 | 47 | attributes.clampFonts, |
| 42 | 48 | ), |
| @@ -49,8 +55,9 @@ | ||
| 49 | 55 | <CopyButton attributes={attributes} /> |
| 50 | 56 | )} |
| 51 | 57 | <RichText.Content value={attributes.codeHTML} /> |
| 52 | 58 | <FooterType {...attributes} /> |
| 59 | + <SeeMoreType {...attributes} /> | |
| 53 | 60 | </> |
| 54 | 61 | ) : null} |
| 55 | 62 | </div> |
| 56 | 63 | ); |