Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
style: format and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
marierigal committed Jun 25, 2023
1 parent a098077 commit 8b14cce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
21 changes: 9 additions & 12 deletions src/team-info/edit.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
import { RichText, useBlockProps } from '@wordpress/block-editor';
import { RichText, useBlockProps as blockProps } from '@wordpress/block-editor';

export const edit = ({
attributes: { icon, title, content },
setAttributes,
}) => {
const onChangeContent = (value) => {
setAttributes({ content: value });
export const edit = ( { attributes: { icon, title, content }, setAttributes } ) => {
const onChangeContent = value => {
setAttributes( { content: value } );
};

return (
<div {...useBlockProps()}>
<div { ...blockProps() }>
<div className="icon-wrapper">
<span className={`icon dashicons dashicons-${icon}`}></span>
<span className={ `icon dashicons dashicons-${ icon }` }></span>
</div>
<div className="content-wrapper">
<h3 className="title">{title}</h3>
<h3 className="title">{ title }</h3>
<RichText
className="content"
value={content}
onChange={onChangeContent}
value={ content }
onChange={ onChangeContent }
tagName="ul"
multiline="li"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/team-info/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import './style.scss';
import { edit } from './edit';
import metadata from './block.json';

registerBlockType(metadata.name, { edit });
registerBlockType( metadata.name, { edit } );

0 comments on commit 8b14cce

Please sign in to comment.