Giter Club home page Giter Club logo

projector-mode-rcl's Introduction

Contributors Forks Stargazers Issues MIT License


Table of Contents ↧
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

Projector Mode RCL Shot

The library allows you to view content in an additional window

Purpose

  • Be able to show content in a separate window

Problem

  • there are very few programs that can show special content in projector mode. Often they have ready-made modules

Scope

  • the library helps to transfer content from one browser window to another.
  • the library should not depend on what content is transferred

Background

  • It's not easy to find a free app for a small church congregation to easily display Bible verses during a service. Especially if it is a translation into OL.

(back to top)

Built With

(back to top)

Getting Started

Installation

Add the library to your React app

  • yarn
yarn add @texttree/projector-mode-rcl
  • npm
npm install @texttree/projector-mode-rcl

(back to top)

Usage

Use the useProjector hook to pass data to the second screen. If you need to somehow manage the value, then use getData only to set the initial value. For example:

import React, { useState } from 'react';
import { useProjector } from '@texttree/projector-mode-rcl';

export default function Settings() {
  const { setData, getData } = useProjector();
  const [verse, setVerse] = useState(() => getData('verse'));
  const [reference, setReference] = useState(() => getData('reference'));
  return (
    <>
      <p>Set verse</p>
      <input
        onChange={(e) => {
          setVerse(e.target.value);
          setData('verse', e.target.value);
        }}
        value={verse}
      />
      <p>Set reference</p>
      <input
        onChange={(e) => {
          setReference(e.target.value);
          setData('reference', e.target.value);
        }}
        value={reference}
      />
    </>
  );
}

Create a component with a layout for the second screen. In the component, use any variables you set via the hook. They will all be available as props.

import React from 'react';

export default function Layout({ verse, reference }) {
  return (
    <>
      <p>{verse}</p>
      <p>
        <small>{reference}</small>
      </p>
    </>
  );
}

Create a separate page and add a Projector component there and pass Layout as a prop

import React from 'react';
import { Projector } from '@texttree/projector-mode-rcl';
import Layout from './Layout';

export default function ProjectorPage() {
  return <Projector Layout={Layout} />;
}

For more examples, please refer to the Styleguidist link

(back to top)

Roadmap

IN PROGRESS

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. Guidelines for external contributions.

You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

If you would like to fork the repo and create a pull request.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Project Link: https://github.com/texttree/projector-mode-rcl

(back to top)

projector-mode-rcl's People

Contributors

foxprogs avatar valyukhov avatar

Stargazers

 avatar

Watchers

 avatar  avatar

projector-mode-rcl's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.