Coder Social home page Coder Social logo

react-too-small's Introduction

react-too-small

Sorry bro, your screen is too small

Build Status npm version

See demo

Installation

Using yarn

yarn add react-too-small

or NPM

npm install --save react-too-small

How to use

import React, { Component } from 'react';
import { render } from 'react-dom';
import Hello from './Hello';
import toSmallBro from 'react-too-small';


class App extends Component {
  constructor() {
    super();
    this.state = {
      name: 'React'
    };
  }

  render() {
    return (
      <div>
        <Hello name={this.state.name} />
        <p>
          Start editing to see some magic happen :)
        </p>
      </div>
    );
  }
}


const ComposedComponent = toSmallBro()(App);

render(<ComposedComponent />, document.getElementById('root'));

Code examples

Setting v1: https://stackblitz.com/edit/react-too-small-default

Setting v2: https://stackblitz.com/edit/react-too-small-v2

Code Climate

Configuration

feel free to change the config

const config = {
  text: {
      header: 'We are sorry,',
      headerSmall: 'but we are not responsive yet ...',
      italic: '*currently in progress',
      button: 'Continue',
    },
    gifSrc: 'https://media.giphy.com/media/w0vFxYaCcvvJm/giphy.gif',
    debounceInterval: 200,
    NoResponsiveComponent: <CustomComponent />,
    withBreakpoints: { width: 700, height: 400 },
    componentName: 'TooSmallBro',
};

const ComposedComponent = toSmallBro(config)(App);

Built With

This project is licensed under the MIT License - see the LICENSE.md file for details

react-too-small's People

Contributors

tuanphungcz avatar

Forkers

ye-man

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.