mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-04 17:07:22 +00:00
TextMessage: add classnames to all message types
This commit is contained in:
parent
d4b0abda46
commit
9fc2265e41
1 changed files with 4 additions and 4 deletions
|
|
@ -2,15 +2,15 @@ import { h } from 'preact'
|
||||||
|
|
||||||
export default function ({ style, text }) {
|
export default function ({ style, text }) {
|
||||||
const defaultContent = (
|
const defaultContent = (
|
||||||
<span class={['message', style].join(' ')}>
|
<span className={['message', style].join(' ')}>
|
||||||
{text}
|
{text}
|
||||||
</span>)
|
</span>)
|
||||||
|
|
||||||
return ({
|
return ({
|
||||||
grid: (<div>{text} </div>),
|
grid: (<div>{text} </div>),
|
||||||
input: (<span class='message input'>> {text}</span>),
|
input: (<span className='message input'>> {text}</span>),
|
||||||
subheader: (<strong>{text}</strong>),
|
subheader: (<strong className='message subheader'>{text}</strong>),
|
||||||
emphasized: (<em>{text}</em>),
|
emphasized: (<em className='message emphasized'>{text}</em>),
|
||||||
endOfLine: (<br />)
|
endOfLine: (<br />)
|
||||||
})[style] || defaultContent
|
})[style] || defaultContent
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue