kajchang / react-device-mockups

📱React Wrapper for html5-device-mockups

Home Page:https://www.npmjs.com/package/react-device-mockups

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-device-mockups

NPM JavaScript Style Guide

Install

npm install --save react-device-mockups html5-device-mockups

Usage

To control the height of the device, see pixelsign/html5-device-mockups#47.

import React, { Component } from 'react';

import 'html5-device-mockups/dist/device-mockups.min.css';

import { IPad } from 'react-device-mockups';

export default class App extends Component {
    render () {
        return (
            <IPad width={300} orientation='landscape' color='black' buttonProps={ {
                onClick: () => alert('Home Button Clicked!')
            } }>
                <iframe title='showcase' src='https://example.com' style={ {
                    width: '100%',
                    height: '100%',
                    margin: 0
                } }/>
            </IPad>
        );
    }
}

License

MIT © kajchang

About

📱React Wrapper for html5-device-mockups

https://www.npmjs.com/package/react-device-mockups


Languages

Language:TypeScript 86.8%Language:JavaScript 10.0%Language:HTML 2.8%Language:CSS 0.4%