mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-20 18:54:03 +08:00
Closes: [BS-2707](https://linear.app/affine-design/issue/BS-2707/统一使用props获取和更新block-prop)
14 lines
370 B
TypeScript
14 lines
370 B
TypeScript
import { type ListBlockModel, ListBlockSchema } from '@blocksuite/affine-model';
|
|
|
|
import { createBlockMeta } from './base.js';
|
|
|
|
export const todoMeta = createBlockMeta<ListBlockModel>({
|
|
selector: block => {
|
|
if (block.flavour !== ListBlockSchema.model.flavour) {
|
|
return false;
|
|
}
|
|
|
|
return (block.model as ListBlockModel).props.type === 'todo';
|
|
},
|
|
});
|