UNPKG

react-google-button

Version:

[![NPM version][npm-image]][npm-url] [![Build Status][build-status-image]][build-status-url] [![Coverage][coverage-image]][coverage-url] [![License][license-image]][license-url] [![Code Style][code-style-image]][code-style-url]

81 lines (71 loc) 2.92 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.disabledIconStyle = exports.disabledStyle = exports.hoverStyle = exports.svgStyle = exports.iconStyle = exports.lightStyle = exports.darkStyle = void 0; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var baseStyle = { height: '50px', width: '240px', border: 'none', textAlign: 'center', verticalAlign: 'center', boxShadow: '0 2px 4px 0 rgba(0,0,0,.25)', fontSize: '16px', lineHeight: '48px', display: 'block', borderRadius: '1px', transition: 'background-color .218s, border-color .218s, box-shadow .218s', fontFamily: 'Roboto,arial,sans-serif', cursor: 'pointer', userSelect: 'none' }; var darkStyle = _objectSpread({ backgroundColor: '#4285f4', color: '#fff' }, baseStyle); exports.darkStyle = darkStyle; var lightStyle = _objectSpread({ backgroundColor: '#fff', color: 'rgba(0,0,0,.54)' }, baseStyle); exports.lightStyle = lightStyle; var iconStyle = { width: '48px', height: '48px', textAlign: 'center', verticalAlign: 'center', display: 'block', marginTop: '1px', marginLeft: '1px', float: 'left', backgroundColor: '#fff', borderRadius: '1px', whiteSpace: 'nowrap' }; exports.iconStyle = iconStyle; var svgStyle = { width: '48px', height: '48px', display: 'block' }; exports.svgStyle = svgStyle; var hoverStyle = { boxShadow: '0 0 3px 3px rgba(66,133,244,.3)', transition: 'background-color .218s, border-color .218s, box-shadow .218s' }; // export const pressedStyle = { // backgroundColor: '#3367D6' // } exports.hoverStyle = hoverStyle; var disabledStyle = { backgroundColor: 'rgba(37, 5, 5, .08)', color: 'rgba(0, 0, 0, .40)', cursor: 'not-allowed' }; exports.disabledStyle = disabledStyle; var disabledIconStyle = { backgroundColor: 'transparent' }; exports.disabledIconStyle = disabledIconStyle;