mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
Rearrange components
This commit is contained in:
parent
39e8b8a526
commit
daa26965cd
16 changed files with 14 additions and 11 deletions
16
src/components/Player/OutputBox/TextMessage.jsx
Normal file
16
src/components/Player/OutputBox/TextMessage.jsx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { h } from 'preact'
|
||||
|
||||
export default function TextMessage ({ style, text }) {
|
||||
const defaultContent = (
|
||||
<span className={['message', style].join(' ')}>
|
||||
{text}
|
||||
</span>)
|
||||
|
||||
return ({
|
||||
grid: (text?.length > 0 ? <div>{text}</div> : <br />),
|
||||
input: (<span className='message input'>> {text}</span>),
|
||||
subheader: (<strong className='message subheader'>{text}</strong>),
|
||||
emphasized: (<em className='message emphasized'>{text}</em>),
|
||||
endOfLine: (<br />),
|
||||
})[style] || defaultContent
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue