mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
ThemesView: ESlint
This commit is contained in:
parent
12d34f3a40
commit
5863134c3e
1 changed files with 8 additions and 6 deletions
|
|
@ -3,13 +3,13 @@ import { Link } from 'wouter-preact'
|
||||||
|
|
||||||
import './ThemesView.css'
|
import './ThemesView.css'
|
||||||
|
|
||||||
const Preview = (themeEngine) => (theme) =>
|
const Preview = (themeEngine, theme) =>
|
||||||
<section key={theme} className={`themePreview ${theme}`}>
|
<section key={theme} className={`themePreview ${theme}`}>
|
||||||
<div className='output'>
|
<div className='output'>
|
||||||
<div className='message input'>
|
<div className='message input'>
|
||||||
> look
|
> look
|
||||||
</div>
|
</div>
|
||||||
<div><br/></div>
|
<div><br /></div>
|
||||||
<div className='message subheader'>
|
<div className='message subheader'>
|
||||||
{theme}
|
{theme}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -17,7 +17,7 @@ const Preview = (themeEngine) => (theme) =>
|
||||||
Observe a vibrant demonstration of colors at work,
|
Observe a vibrant demonstration of colors at work,
|
||||||
showcasing their versatile usage right before your eyes.
|
showcasing their versatile usage right before your eyes.
|
||||||
</div>
|
</div>
|
||||||
<div><br/></div>
|
<div><br /></div>
|
||||||
</div>
|
</div>
|
||||||
<button onClick={() => themeEngine.setTheme(theme)}>
|
<button onClick={() => themeEngine.setTheme(theme)}>
|
||||||
Apply this colors
|
Apply this colors
|
||||||
|
|
@ -25,7 +25,9 @@ const Preview = (themeEngine) => (theme) =>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
export default function ThemesView ({ themeEngine }) {
|
export default function ThemesView ({ themeEngine }) {
|
||||||
const themes = themeEngine.themes.map(Preview(themeEngine))
|
const themes = themeEngine
|
||||||
|
.themes
|
||||||
|
.map((theme) => Preview(themeEngine, theme))
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className='view themes'>
|
<main className='view themes'>
|
||||||
|
|
@ -47,7 +49,7 @@ export default function ThemesView ({ themeEngine }) {
|
||||||
<div className='message input'>
|
<div className='message input'>
|
||||||
> look
|
> look
|
||||||
</div>
|
</div>
|
||||||
<div><br/></div>
|
<div><br /></div>
|
||||||
<div className='message subheader'>
|
<div className='message subheader'>
|
||||||
Selected: {themeEngine.currentTheme}
|
Selected: {themeEngine.currentTheme}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -55,7 +57,7 @@ export default function ThemesView ({ themeEngine }) {
|
||||||
You can set random one with the button below
|
You can set random one with the button below
|
||||||
or choose any theme from the list.
|
or choose any theme from the list.
|
||||||
</div>
|
</div>
|
||||||
<div><br/></div>
|
<div><br /></div>
|
||||||
</div>
|
</div>
|
||||||
<button onClick={() => themeEngine.setRandomTheme()}>
|
<button onClick={() => themeEngine.setRandomTheme()}>
|
||||||
Set a random theme
|
Set a random theme
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue