Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-overlays-tether
Advanced tools
A wrapper for Tether customizable components: tooltip, dropdown and select
<TetherTooltip classes="tooltip-theme-twipsy" position="left middle" content="bla bla">
<button>right center</button>
</TetherTooltip>
options
:getTooltip() {
return {
content: 'My awesome <b>content</b>.',
classes: 'tooltip-theme-arrows',
position: 'right middle',
};
}
<TetherTooltip options={this.getTooltip()}>
<button>Tooltip</button>
</TetherTooltip>
property | type | description | * |
---|---|---|---|
children | any | The trigger element | * |
options | object | Tether Tooltip configuration | * |
content | any | the content of the tooltip | * |
classes | string | Tooltip theme class | * |
position | string | Tooltip position | * |
<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',
};
}
property | type | description | * |
---|---|---|---|
children | any | The trigger element | * |
options | object | Tether Drop configuration | * |
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>
...
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>
property | type | description | * |
---|---|---|---|
children | any | The trigger element | * |
theme | string | Tether Select theme | * |
options | object | Tether Drop configuration | * |
npm install
npm start
./demo
foldernpm install
npm start
./demo
foldernpm install
npm run start:umd
This components uses AVA, Airbnb Enzyne, JSDOM, react-addons-test-utils and many other tools (see package.json
for the whole list).
npm install
npm run test
NOTE: The environment is ready but there are still no tests)
npm run lint
Based on library-boilerplate by Dan Abramov
FAQs
React Overlays Tether
We found that react-overlays-tether demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.