Skip to content

afeiship/react-searchlight

Repository files navigation

react-searchlight

Searchlight for react.

version license size download

installation

npm install -S @jswork/react-searchlight

properties

Name Type Required Default Description
className string false - The extended className for component.
options object false - The default options for react-draggable.

usage

  1. import css
@import "~@jswork/react-searchlight/dist/style.css";

// or use sass
@import "~@jswork/react-searchlight/dist/style.scss";

// customize your styles:
$react-searchlight-options: ()
  1. import js
import ReactDemokit from '@jswork/react-demokit';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactSearchlight from '@jswork/react-searchlight';
import './assets/style.scss';

class App extends React.Component {
  render() {
    return (
      <ReactDemokit
        className="p-3 app-container"
        url="https://github.com/afeiship/react-searchlight">
        <h1 className="text-center mb-5 text-white text-2xl">
          Searchlight for react.
        </h1>
        <iframe width="100%" src="https://m.baidu.com"></iframe>
        <ReactSearchlight />
      </ReactDemokit>
    );
  }
}

ReactDOM.render(<App />, document.getElementById('app'));

documentation

license

Code released under the MIT license.