function StyleDropdown({ options, index, onChoose, defaultText }) { const text = index < 0 ? defaultText : options[index]; let optionLinks = []; for (let i=0; i onChoose(i) }, options[i] ) ); return h( 'div.StyleDropdownContainer', {} [ h('button.StyleDropdownButton', {}, text), h('div.StyleDropdownContent', {}, optionLinks) ] ); }