a tool for shared writing and social publishing

add list / command

+16 -1
+15
components/Blocks/BlockCommands.tsx
··· 28 28 } from "components/Icons/BlockTextSmall"; 29 29 import { LinkSmall } from "components/Icons/LinkSmall"; 30 30 import { BlockRSVPSmall } from "components/Icons/BlockRSVPSmall"; 31 + import { ListUnorderedSmall } from "components/Toolbar/ListToolbar"; 31 32 32 33 type Props = { 33 34 parent: string; ··· 139 140 type: "text", 140 141 onSelect: async (rep, props, um) => { 141 142 await setHeaderCommand(3, rep, props); 143 + }, 144 + }, 145 + { 146 + name: "List", 147 + icon: <ListUnorderedSmall />, 148 + type: "text", 149 + onSelect: async (rep, props, um) => { 150 + let entity = await createBlockWithType(rep, props, "text"); 151 + await rep?.mutate.assertFact({ 152 + entity, 153 + attribute: "block/is-list", 154 + data: { value: true, type: "boolean" }, 155 + }); 156 + clearCommandSearchText(entity); 142 157 }, 143 158 }, 144 159
+1 -1
components/Toolbar/ListToolbar.tsx
··· 163 163 ); 164 164 }; 165 165 166 - const ListUnorderedSmall = (props: Props) => { 166 + export const ListUnorderedSmall = (props: Props) => { 167 167 return ( 168 168 <svg 169 169 width="24"