tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
add list / command
awarm.space
8 months ago
d079d57a
5c4431d5
+16
-1
2 changed files
expand all
collapse all
unified
split
components
Blocks
BlockCommands.tsx
Toolbar
ListToolbar.tsx
+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
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
143
+
},
144
144
+
},
145
145
+
{
146
146
+
name: "List",
147
147
+
icon: <ListUnorderedSmall />,
148
148
+
type: "text",
149
149
+
onSelect: async (rep, props, um) => {
150
150
+
let entity = await createBlockWithType(rep, props, "text");
151
151
+
await rep?.mutate.assertFact({
152
152
+
entity,
153
153
+
attribute: "block/is-list",
154
154
+
data: { value: true, type: "boolean" },
155
155
+
});
156
156
+
clearCommandSearchText(entity);
142
157
},
143
158
},
144
159
+1
-1
components/Toolbar/ListToolbar.tsx
···
163
163
);
164
164
};
165
165
166
166
-
const ListUnorderedSmall = (props: Props) => {
166
166
+
export const ListUnorderedSmall = (props: Props) => {
167
167
return (
168
168
<svg
169
169
width="24"