mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
parent
797f8be2f7
commit
8e1c07f08e
|
|
@ -28,7 +28,6 @@ export interface PSElements extends preact.JSX.IntrinsicElements {
|
|||
spotify: {src: string};
|
||||
username: {name?: string, class?: string};
|
||||
psicon: {pokemon: string} | {item: string} | {type: string} | {category: string};
|
||||
center: {class?: string};
|
||||
}
|
||||
|
||||
export {render};
|
||||
|
|
@ -37,13 +36,3 @@ export type VNode = preact.VNode;
|
|||
|
||||
export const h = preact.h;
|
||||
export const Fragment = preact.Fragment;
|
||||
|
||||
export class FormatText extends preact.Component<{isTrusted?: boolean, replaceLinebreaks?: boolean}> {
|
||||
render() {
|
||||
const child = this.props.children;
|
||||
if (typeof child !== 'string') throw new Error(`Invalid props.children type: ${!child ? child : typeof child}`);
|
||||
return <span dangerouslySetInnerHTML={
|
||||
{__html: Chat.formatText(child, this.props.isTrusted, this.props.replaceLinebreaks)}
|
||||
} />;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user