芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/www/wp-content/plugins/blocksy-companion/static/js/editor/blocks/breadcrumbs/Edit.js
import { createElement, useRef } from '@wordpress/element' import { __ } from 'ct-i18n' import { InspectorControls, useBlockProps, withColors, } from '@wordpress/block-editor' import Preview from './Preview' import ColorsPanel from '../../components/ColorsPanel' const Edit = ({ clientId, textColor, setTextColor, linkColor, setLinkColor, linkHoverColor, setLinkHoverColor, className, }) => { const navRef = useRef() const blockProps = useBlockProps({ ref: navRef, className: { 'ct-breadcrumbs': true, className, }, style: { color: textColor?.color, '--theme-link-initial-color': linkColor?.color, '--theme-link-hover-color': linkHoverColor?.color, }, }) return ( <>
{ setTextColor('') setLinkColor('') setLinkHoverColor('') }} panelId={clientId} settings={[ { colorValue: textColor.color, enableAlpha: true, label: __('Text', 'blocksy-companion'), onColorChange: setTextColor, }, { colorValue: linkColor.color, enableAlpha: true, label: __('Link Initial', 'blocksy-companion'), onColorChange: setLinkColor, }, { colorValue: linkHoverColor.color, enableAlpha: true, label: __('Link Hover', 'blocksy-companion'), onColorChange: setLinkHoverColor, }, ]} />
> ) } export default withColors( { textColor: 'color' }, { linkColor: 'color' }, { linkHoverColor: 'color' } )(Edit)