File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
src/renderer/attribute/impl Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 16
16
" The font-family attribute indicates which font family will be used to render the text,
17
17
specified as a prioritized list of font family names and/or generic family names." )
18
18
19
+ (defn font-item
20
+ [font]
21
+ [:> Command/CommandItem
22
+ {:on-select #(rf/dispatch [::element.events/set-attr :font-family font])}
23
+ [:div.flex.justify-between.items-center.w-full.gap-2
24
+ [:div font]
25
+ [:div.leading-none.text-muted
26
+ {:style {:font-family font}}
27
+ " AaBbCc 0123" ]]])
28
+
19
29
(defn suggestions-list
20
30
[font-list]
21
31
[:div.flex.flex-col
34
44
" No local fonts found." )]
35
45
(for [font font-list]
36
46
^{:key font}
37
- [:> Command/CommandItem
38
- {:on-select #(rf/dispatch [::element.events/set-attr :font-family font])}
39
- [:div.flex.justify-between.items-center.w-full.gap-2
40
- [:div font]
41
- [:div.leading-none.text-muted
42
- {:style {:font-family font}}
43
- " AaBbCc 0123" ]]])]]]])
47
+ [font-item font])]]]])
44
48
45
49
(defmethod attribute.hierarchy /form-element [:default :font-family ]
46
50
[_ k v attrs]
You can’t perform that action at this time.
0 commit comments