Centering absolute position dropdown in Preact
up vote
0
down vote
favorite
I am making a PWA with Preact (a React-Native alternative) I am having issues with centering a dropdown. Don't mind the this.animate, that's for preact-motion to trigger an animation on the dropdown. Is there something I am missing here? My goal is for the dropdown to appear centered just below the plus button when the button is pressed. HTML: <div class={style.home}> <div class={style.addSound}> <button class={style.addItem} onClick={this.animate}> <Icon class={styles.selectIcon} src={Plus} /> </button> </div> {/*Passes current value of this.state.height as height value*/} <Motion style={{ height: spring(this.state.height) }}> ...
