chore: add code formatting and linting (#952)
This commit is contained in:
@ -3,21 +3,26 @@ import React from 'react';
|
||||
const image = {
|
||||
label: 'Image',
|
||||
id: 'image',
|
||||
fromBlock: match => match && {
|
||||
image: match[2],
|
||||
alt: match[1],
|
||||
},
|
||||
toBlock: data => ``,
|
||||
toPreview: (data, getAsset) => <img src={getAsset(data.image) || ''} alt={data.alt || ''} />, // eslint-disable-line react/display-name
|
||||
fromBlock: match =>
|
||||
match && {
|
||||
image: match[2],
|
||||
alt: match[1],
|
||||
},
|
||||
toBlock: data => ``,
|
||||
// eslint-disable-next-line react/display-name
|
||||
toPreview: (data, getAsset) => <img src={getAsset(data.image) || ''} alt={data.alt || ''} />,
|
||||
pattern: /^!\[(.*)\]\((.*)\)$/,
|
||||
fields: [{
|
||||
label: 'Image',
|
||||
name: 'image',
|
||||
widget: 'image',
|
||||
}, {
|
||||
label: 'Alt Text',
|
||||
name: 'alt',
|
||||
}],
|
||||
fields: [
|
||||
{
|
||||
label: 'Image',
|
||||
name: 'image',
|
||||
widget: 'image',
|
||||
},
|
||||
{
|
||||
label: 'Alt Text',
|
||||
name: 'alt',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default image;
|
||||
|
Reference in New Issue
Block a user