Skip to content

Commit

Permalink
move the language format definition before the component
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Apr 25, 2023
1 parent 6761315 commit 560fcbb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/format-library/src/language/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ import { translation } from '@wordpress/icons';
const name = 'core/language';
const title = __( 'Language' );

export const language = {
name,
tagName: 'span',
className: 'lang-attribute',
edit: Edit,
title,
};

const Edit = ( props ) => {
const { contentRef, isActive, onChange, value } = props;
const anchorRef = useAnchor( {
Expand Down Expand Up @@ -104,11 +112,3 @@ const Edit = ( props ) => {
</>
);
};

export const language = {
name,
tagName: 'span',
className: 'lang-attribute',
edit: Edit,
title,
};

0 comments on commit 560fcbb

Please sign in to comment.