@@ -597,12 +597,19 @@ export function LiveEditor({
597597 < div className = "controls flex flex-row md:flex-nowrap mt-8 md:mt-8 mb-4 md:mb-4 items-start md:items-center justify-start md:justify-center w-full" >
598598 { /* Left controls */ }
599599 < div className = "grid grid-cols-2 md:grid-cols-3 gap-2 p-4 rounded-lg bg-[var(--app-editor-bg-color)] controls-left-panel flex-1" >
600- < ControlButton id = "control-control" checked = { controls } onChange = { setControls } text = "controls" />
601- < ControlButton
602- id = "control-line-numbers"
603- checked = { lineNumbers }
604- onChange = { setLineNumbers }
605- text = "line no."
600+ < DropdownMenu
601+ className = "dropdown-menu-highlight"
602+ buttonRef = { themeButtonRef }
603+ buttonText = { < ThemeColorBlocks theme = { highlightTheme } /> }
604+ items = { SYNTAX_THEMES . map ( ( theme ) => ( { text : theme } ) ) }
605+ onChange = { ( text ) => {
606+ setHighlightTheme ( text )
607+ } }
608+ onNext = { ( ) => {
609+ const nextIndex = SYNTAX_THEMES . indexOf ( highlightTheme ) + 1
610+ const nextTheme = SYNTAX_THEMES [ nextIndex % SYNTAX_THEMES . length ]
611+ setHighlightTheme ( nextTheme )
612+ } }
606613 />
607614 < ControlButton
608615 id = "control-theme"
@@ -611,6 +618,12 @@ export function LiveEditor({
611618 text = { theme === 'dark' ? 'dark' : 'light' }
612619 prefix = { < span > { theme === 'dark' ? '🌙' : '☀️' } </ span > }
613620 />
621+ < ControlButton
622+ id = "control-line-numbers"
623+ checked = { lineNumbers }
624+ onChange = { setLineNumbers }
625+ text = "line no."
626+ />
614627 < RangeSelector
615628 text = "indent"
616629 className = "range-control"
@@ -621,20 +634,6 @@ export function LiveEditor({
621634 onChange = { setLineNumbersWidth }
622635 displayValue = { false }
623636 />
624- < DropdownMenu
625- className = "dropdown-menu-highlight"
626- buttonRef = { themeButtonRef }
627- buttonText = { < ThemeColorBlocks theme = { highlightTheme } /> }
628- items = { SYNTAX_THEMES . map ( ( theme ) => ( { text : theme } ) ) }
629- onChange = { ( text ) => {
630- setHighlightTheme ( text )
631- } }
632- onNext = { ( ) => {
633- const nextIndex = SYNTAX_THEMES . indexOf ( highlightTheme ) + 1
634- const nextTheme = SYNTAX_THEMES [ nextIndex % SYNTAX_THEMES . length ]
635- setHighlightTheme ( nextTheme )
636- } }
637- />
638637 < ControlButton
639638 id = "control-format"
640639 checked
@@ -665,6 +664,7 @@ export function LiveEditor({
665664 text = "format"
666665 prefix = { < FormatIcon width = { 14 } height = { 14 } stroke = "currentColor" strokeWidth = "2" className = { isFormatting ? 'mop-animate' : '' } /> }
667666 />
667+ < ControlButton id = "control-control" checked = { controls } onChange = { setControls } text = "controls" />
668668 </ div >
669669 { /* Right side screenshot button */ }
670670 < div className = "inline-flex items-center self-stretch gap-2 flex-shrink-0" >
0 commit comments