flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
44
VISUALIZACION/node_modules/polished/lib/shorthands/buttons.js
generated
vendored
Executable file
44
VISUALIZACION/node_modules/polished/lib/shorthands/buttons.js
generated
vendored
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = buttons;
|
||||
var _statefulSelectors = _interopRequireDefault(require("../internalHelpers/_statefulSelectors"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
var stateMap = [undefined, null, 'active', 'focus', 'hover'];
|
||||
function template(state) {
|
||||
return "button" + state + ",\n input[type=\"button\"]" + state + ",\n input[type=\"reset\"]" + state + ",\n input[type=\"submit\"]" + state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates selectors that target all buttons. You can pass optional states to append to the selectors.
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* [buttons('active')]: {
|
||||
* 'border': 'none'
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* > ${buttons('active')} {
|
||||
* border: none;
|
||||
* }
|
||||
* `
|
||||
*
|
||||
* // CSS in JS Output
|
||||
*
|
||||
* 'button:active,
|
||||
* 'input[type="button"]:active,
|
||||
* 'input[type=\"reset\"]:active,
|
||||
* 'input[type=\"submit\"]:active: {
|
||||
* 'border': 'none'
|
||||
* }
|
||||
*/
|
||||
function buttons() {
|
||||
for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
states[_key] = arguments[_key];
|
||||
}
|
||||
return (0, _statefulSelectors["default"])(states, template, stateMap);
|
||||
}
|
||||
module.exports = exports.default;
|
||||
Loading…
Add table
Add a link
Reference in a new issue