react-scripted-text

0.1.1 • Public • Published

react-scripted-text (Alpha)

React component and hook to display script-based text output.

NPM JavaScript Style Guide

Install

npm install --save react-scripted-text

Usage

import React from 'react'

import ScriptedText from 'react-scripted-text'

const App = () => {
  return (
    <div>
      <ScriptedText script="text_script.txt" />
      {/* or */}
      <div>
        { useScriptedText({script_file: "text_script.txt"})}
      </div>
    </div>
  )
}

export default App
// see github example/public/script.txt for an example
// this section will be updated soon

Version History

0.1.1 Usability Fixes

  • removed console.logs
  • changed ScriptedText property to script (formerly script_file)

0.1.0 Alpha Release

  • ScriptedText component
  • useScriptedText hook
  • Available commands: langs, set (lang, delay, speed), *n, wait, clear

License

MIT © ZJVieth

Readme

Keywords

none

Package Sidebar

Install

npm i react-scripted-text

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

55.9 kB

Total Files

7

Last publish

Collaborators

  • zjvieth