mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
InputBox: extract MenuButton
This commit is contained in:
parent
daa26965cd
commit
674c6c7c51
2 changed files with 18 additions and 8 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { h } from 'preact'
|
import { h } from 'preact'
|
||||||
import { useEffect, useRef, useState } from 'preact/hooks'
|
import { useEffect, useRef, useState } from 'preact/hooks'
|
||||||
|
|
||||||
import s from './MenuButton/MenuButton.module.scss'
|
import MenuButton from './MenuButton/MenuButton'
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
const keyCodes = {
|
const keyCodes = {
|
||||||
|
|
@ -141,13 +141,8 @@ export default function InputBox ({
|
||||||
onDblClick={onFullscreenRequest}
|
onDblClick={onFullscreenRequest}
|
||||||
onInput={({ target: { value } }) => setInputText(value)}
|
onInput={({ target: { value } }) => setInputText(value)}
|
||||||
type='search' />
|
type='search' />
|
||||||
<button
|
<MenuButton
|
||||||
aria-label='Menu'
|
onClick={() => setMenuOpen(true)} />
|
||||||
className={s.menuButton}
|
|
||||||
onClick={() => setMenuOpen(true)}
|
|
||||||
>
|
|
||||||
=
|
|
||||||
</button>
|
|
||||||
</section>
|
</section>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
15
src/components/Player/InputBox/MenuButton/MenuButton.jsx
Normal file
15
src/components/Player/InputBox/MenuButton/MenuButton.jsx
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
import { h } from 'preact'
|
||||||
|
|
||||||
|
import s from './MenuButton.module.scss'
|
||||||
|
|
||||||
|
export default MenuButton = ({ onClick }) => {
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
aria-label='Menu'
|
||||||
|
className={s.menuButton}
|
||||||
|
onClick={() => setMenuOpen(true)}
|
||||||
|
>
|
||||||
|
=
|
||||||
|
</button>
|
||||||
|
)
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue