float-ps

0.1.0 • Public • Published

float-ps Build Status Dependency Status devDependency Status

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

Package Sidebar

Install

npm i float-ps

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • creaturephil