Skip to content

Commit

Permalink
some basic styling brought over from the theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-c-woodard committed Mar 1, 2024
1 parent d290b07 commit 40879c7
Show file tree
Hide file tree
Showing 4 changed files with 1,552 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/blocks/navigation-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ export default function Edit(props) {
'is-dragging-within': isDraggingWithin,
'has-link': !!url,
'has-child': hasChildren,
'menu-item--toggled-on': showSubMenus,
[`wp-block-kadence-navigation-link${uniqueID}`]: uniqueID,
}),
onKeyDown,
Expand Down Expand Up @@ -604,7 +605,7 @@ export default function Edit(props) {
<ToggleControl
label={__('Show Sub Menus', 'kadence-blocks')}
checked={showSubMenus}
onChange={(value) => setShowSubmenus(value)}
onChange={(value) => setShowSubMenus(value)}
/>
)}
<TextControl
Expand Down
23 changes: 13 additions & 10 deletions src/blocks/navigation/edit-inner.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function EditInner(props) {
undefined !== mobilePadding ? mobilePadding[3] : ''
);

const formClasses = classnames({
const navClasses = classnames('menu', {
'kb-navigation': true,
[`kb-navigation-${id}`]: true,
[`kb-navigation${uniqueID}`]: uniqueID,
Expand Down Expand Up @@ -206,7 +206,7 @@ export function EditInner(props) {

const innerBlocksProps = useInnerBlocksProps(
{
className: formClasses,
className: navClasses,
style: {
marginTop: '' !== previewMarginTop ? getSpacingOptionOutput(previewMarginTop, marginUnit) : undefined,
marginRight:
Expand Down Expand Up @@ -260,20 +260,20 @@ export function EditInner(props) {
icon={formBlockIcon}
>
<p style={{ width: '100%', marginBottom: '10px' }}>
{__('Advanced forms can not be edited within the widgets screen.', 'kadence-blocks')}
{__('Advanced Navs can not be edited within the widgets screen.', 'kadence-blocks')}
</p>
<Button href={editPostLink} variant="primary" className="kb-form-edit-link">
{__('Edit Form', 'kadence-blocks')}
<Button href={editPostLink} variant="primary" className="kb-navigation-edit-link">
{__('Edit Navigation', 'kadence-blocks')}
</Button>
</Placeholder>
<InspectorControls>
<KadencePanelBody
panelName={'kb-advanced-form-selected-switch'}
title={__('Selected Form', 'kadence-blocks')}
panelName={'kb-advanced-navigation-selected-switch'}
title={__('Selected Navigation', 'kadence-blocks')}
>
<SelectForm
postType="kadence_navigation"
label={__('Selected Form', 'kadence-blocks')}
label={__('Selected Navigation', 'kadence-blocks')}
hideLabelFromVision={true}
onChange={(nextId) => {
setAttributes({ id: parseInt(nextId) });
Expand Down Expand Up @@ -436,8 +436,11 @@ export function EditInner(props) {
help={__('Separate multiple classes with spaces.')}
/>
</InspectorAdvancedControls>

<div {...innerBlocksProps} />
<nav className="navigation navigation-dropdown-animation-fade-none">
<div className="menu-container">
<ul {...innerBlocksProps} />
</div>
</nav>
{/*<SpacingVisualizer*/}
{/* style={ {*/}
{/* marginLeft: ( undefined !== previewMarginLeft ? getSpacingOptionOutput( previewMarginLeft, marginUnit ) : undefined ),*/}
Expand Down
Loading

0 comments on commit 40879c7

Please sign in to comment.