File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 10
10
(defmethod attribute.hierarchy /form-element [:default :style ]
11
11
[_ k v {:keys [disabled]}]
12
12
(let [codemirror-theme @(rf/subscribe [::theme.subs/codemirror ])]
13
- [:div.w-full.bg-primary.p -1
13
+ [:div.w-full.bg-primary.px-2.py -1
14
14
{:class (when disabled " *:[&.CodeMirror]:opacity-50" )}
15
- [views/cm-editor v {:on-blur #(rf/dispatch [::element.events/set-attr k %])
16
- :attrs {:id (name k)}
17
- :options {:mode " css"
18
- :readOnly disabled
19
- :theme codemirror-theme}}]]))
15
+ [views/cm-editor (str v) {:on-blur #(rf/dispatch [::element.events/set-attr k %])
16
+ :attrs {:id (name k)}
17
+ :options {:mode " css"
18
+ :placeholder (when-not v " multiple" )
19
+ :readOnly disabled
20
+ :theme codemirror-theme}}]]))
Original file line number Diff line number Diff line change 1
1
@utility form-element {
2
- @apply bg-primary border-0 w-full outline-none shadow-none!;
2
+ @apply bg-primary border-0 w-full outline-none px-3 py-1 shadow-none!;
3
3
4
- padding : 4px 12px ;
5
4
box-sizing : border-box;
6
5
font-size : 12px ;
7
6
color : var (--font-color ) !important ;
Original file line number Diff line number Diff line change 125
125
@apply bg-secondary!;
126
126
}
127
127
128
+ .CodeMirror-placeholder {
129
+ @apply text-disabled! font-sans!;
130
+ }
131
+
128
132
.CodeMirror {
129
133
@apply font-mono h-auto z-0;
130
134
background : transparent !important ;
Original file line number Diff line number Diff line change 10
10
[" @radix-ui/react-switch" :as Switch]
11
11
[" @repath-project/react-color" :refer [PhotoshopPicker]]
12
12
[" codemirror" :as codemirror]
13
+ [" codemirror/addon/display/placeholder.js" ]
13
14
[" codemirror/addon/hint/css-hint.js" ]
14
15
[" codemirror/addon/hint/show-hint.js" ]
15
16
[" codemirror/mode/css/css.js" ]
You can’t perform that action at this time.
0 commit comments