芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/ycreate.jp/wp-content/plugins/snow-monkey-blocks/src/blocks/btn/save.js
import classnames from 'classnames'; import { RichText, useBlockProps } from '@wordpress/block-editor'; export default function ( { attributes, className } ) { const { content, url, target, modifier, borderRadius, backgroundColor, backgroundGradientColor, textColor, wrap, } = attributes; const wrapperClasses = classnames( 'smb-btn-wrapper', className, { [ `smb-btn-wrapper--${ modifier }` ]: !! modifier, } ); const classes = classnames( 'smb-btn', { [ `smb-btn--${ modifier }` ]: !! modifier, 'smb-btn--wrap': wrap, } ); const styles = { '--smb-btn--background-color': backgroundColor || undefined, '--smb-btn--background-image': backgroundGradientColor || undefined, '--smb-btn--border-radius': String( borderRadius ).match( /^\d+$/ ) ? `${ borderRadius }px` : borderRadius, '--smb-btn--color': textColor || undefined, }; if ( !! attributes.className && attributes.className.split( ' ' ).includes( 'is-style-ghost' ) ) { styles[ '--smb-btn--style--ghost--border-color' ] = backgroundColor || undefined; } return (
); }