mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17: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 }) {
|
||||
const defaultContent = (
|
||||
<span class={['message', style].join(' ')}>
|
||||
<span className={['message', style].join(' ')}>
|
||||
{text}
|
||||
</span>)
|
||||
|
||||
return ({
|
||||
grid: (<div>{text} </div>),
|
||||
input: (<span class='message input'>> {text}</span>),
|
||||
subheader: (<strong>{text}</strong>),
|
||||
emphasized: (<em>{text}</em>),
|
||||
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