File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ Blockly.FieldCustom.registerInput(
207207 'TEST_BUTTON' ,
208208 ( ( ) => {
209209 const div = document . createElement ( "div" ) ;
210- div . setAttribute ( "style" , `width: 32px; height: 32px; padding: 6px 10px; border-radius: 4px; border: solid 1px #00000030;` ) ;
210+ div . setAttribute ( "style" , `width: 32px; height: 32px; padding: 6px 10px; text-align: center; font-weight: 500; border-radius: 4px; border: solid 1px #00000030;` ) ;
211211 return div ;
212212 } ) ( ) ,
213213 ( field , input ) => {
@@ -216,7 +216,7 @@ Blockly.FieldCustom.registerInput(
216216
217217 input . textContent = "alert" ;
218218 input . style . width = "max-content" ;
219- input . style . color = srcBlock . textColor ? srcBlock . textColor : "#fff" ;
219+ input . style . color = srcBlock && srcBlock . textColor ? srcBlock . textColor : "#fff" ;
220220
221221 const properWidth = goog . style . getSize ( input ) . width ;
222222 input . style . width = properWidth + "px" ;
You can’t perform that action at this time.
0 commit comments