New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-overlays-tether

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-overlays-tether

React Overlays Tether

  • 0.0.3
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Overlays Tether

A wrapper for Tether customizable components: tooltip, dropdown and select

dependencies
  • Tether (20k)
  • Tether Tooltip (1.9k)
  • Tether Select (9.5k)
  • Tether Drop (8.5k)

Tooltip

Tooltip Usage with attributes:
<TetherTooltip classes="tooltip-theme-twipsy" position="left middle" content="bla bla">
  <button>right center</button>
</TetherTooltip>
Tooltip Usage with options:
getTooltip() {
  return {
    content: 'My awesome <b>content</b>.',
    classes: 'tooltip-theme-arrows',
    position: 'right middle',
  };
}
<TetherTooltip options={this.getTooltip()}>
  <button>Tooltip</button>
</TetherTooltip>

Properties

propertytypedescription*
childrenanyThe trigger element*
optionsobjectTether Tooltip configuration*
contentanythe content of the tooltip*
classesstringTooltip theme class*
positionstringTooltip position*
  • More info about options on Tether website.

Popover

<TetherDrop options={this.getPopover()}>
  <button>OPEN Popover</button>
</TetherDrop>
getPopover() {
  return {
    content: '<input type="range" />',
    position: 'right middle',
    classes: 'drop-theme-twipsy',
    // constrainToWindow: true,
    // constrainToScrollParent: false,
    openOn: 'click',
  };
}

Properties

propertytypedescription*
childrenanyThe trigger element*
optionsobjectTether Drop configuration*

Select

Simple Usage
import TetherSelect from 'xyz-components/components/TetherSelect';
import '../css/overlays-select/select-theme-dark.css';
<TetherSelect theme="select-theme-dark">
  <option value="">label A</option>
  <option value="">label B</option>
</TetherSelect>
Dynamic Usage
...
const optionTpl = list.map(function getOptionItem(item, index) {
  return (
     <option value={index} key={'option' + index}>{item.text}</option>
  );
});
...

onSelect(event) {
  console.log (event.target.value)
}

The component also supports any property or method that you usually use with the <select /> element (as shown below).

<TetherSelect theme="select-theme-dark"
              onChange={(event) => this.onSelect(event)}
              value={this.state.index} >
  {optionTpl}
</TetherSelect>

Properties

propertytypedescription*
childrenanyThe trigger element*
themestringTether Select theme*
optionsobjectTether Drop configuration*

CLI: run, build, test, lint

Build component

  1. npm install
  2. npm start

Run demo

  1. Go to ./demo folder
  2. npm install
  3. npm start
  4. browse http://localhost:3000

Build the demo (distribution)

  1. Go to ./demo folder
  2. npm install
  3. npm run start:umd
  4. browse http://localhost:8080

Run Test

This components uses AVA, Airbnb Enzyne, JSDOM, react-addons-test-utils and many other tools (see package.json for the whole list).

  1. Go the project root folder
  2. npm install
  3. npm run test

NOTE: The environment is ready but there are still no tests)

Lint

  1. Go the project root folder
  2. npm run lint

Authors and Contributors

Based on library-boilerplate by Dan Abramov

Keywords

FAQs

Package last updated on 24 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc