2020-12-30 01:32:46 +00:00
|
|
|
import {
|
2022-03-11 16:50:50 +00:00
|
|
|
IBlockData,
|
2021-03-08 15:29:35 +00:00
|
|
|
generateBlockId,
|
|
|
|
} from '@schlechtenburg/core';
|
|
|
|
import {
|
|
|
|
name as paragraphName,
|
2020-12-30 01:32:46 +00:00
|
|
|
ParagraphData,
|
|
|
|
getDefaultData as getDefaultParagraphData
|
2020-12-30 13:34:23 +00:00
|
|
|
} from '@schlechtenburg/paragraph';
|
2020-05-24 20:52:33 +00:00
|
|
|
|
|
|
|
export interface ImageData {
|
|
|
|
src: string;
|
|
|
|
alt: string;
|
2022-03-11 16:50:50 +00:00
|
|
|
description: IBlockData<ParagraphData>;
|
2020-05-24 20:52:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const getDefaultData: () => ImageData = () => ({
|
|
|
|
src: '',
|
|
|
|
alt: '',
|
2021-03-08 15:29:35 +00:00
|
|
|
description: {
|
|
|
|
id: generateBlockId(),
|
|
|
|
name: paragraphName,
|
|
|
|
data: getDefaultParagraphData(),
|
|
|
|
},
|
2020-05-24 20:52:33 +00:00
|
|
|
});
|