float-ps
v0.1.0
Published
Pokemon Showdown Common Elements
Downloads
4
Maintainers
Readme
float-ps
Pokemon Showdown Common Elements.
Usage
const Float = require('float-ui');
const Float_PS = require('float-ps');
Float.extendElements(Float_PS);
console.log(Float.renderElement('<CommandButton command="Hi">Say Hi!</CommandButton>'));
// => <button name="send" value="Hi">Say Hi!</button>
Install
$ npm install --save float-ps
Elements
Break
Converts into multiple <br>
tags.
Prop:
amount
: Number
Example:
<Break amount="5"></Break>
// => <br></br><br></br><br></br><br></br><br></br>
CommandButton
Creates a button that parses a command.
Prop:
command
: String
Example:
<CommandButton command="/say hi">Click me!</CommandButton>
// => <button name="send" value="/me says hi">Click me!</button>
JoinRoom
Link to a room.
Prop:
room
: String
Example:
<JoinRoom room="casino">Click here to earn big bucks!</JoinRoom>
// => <a href="/casino"><button>Click here to earn big bucks!</button></a>
License
MIT © Phil