Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tds2/button

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tds2/button - npm Package Compare versions

Comparing version 0.1.24 to 0.1.25

lib/sharedStyle.js

2

lib/Button.js

@@ -1,1 +0,1 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _this=this,_jsxFileName="/Users/hamedmamdoohi/Desktop/omni-channel-components/packages/Button/src/Button.jsx";var Button=function Button(_ref){var children=_ref.children;return _react.default.createElement(_reactNative.TouchableOpacity,{style:{minWidth:180,width:'max-content'},onPress:function onPress(){},style:{borderRadius:4,borderWidth:1,borderColor:'green',backgroundColor:'green',alignItems:'center'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:5,columnNumber:3}},_react.default.createElement(_reactNative.Text,{style:{fontFamily:'TELUS',paddingVertical:16,fontSize:16,fontWeight:'600',color:'white'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:16,columnNumber:5}},children));};var _default=Button;exports.default=_default;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _propTypes=_interopRequireDefault(require("prop-types"));var _reactNative=require("react-native");var _hooks=require("../../hooks");var _sharedStyle=require("./sharedStyle");var _this=this,_jsxFileName="/Users/hamedmamdoohi/Desktop/react-native-storybook/packages/Button/src/Button.jsx";var Button=function Button(_ref){var variant=_ref.variant,children=_ref.children;var color=(0,_sharedStyle.setColorByVariant)(variant);var fontsLoaded=(0,_hooks.useCustomFonts)();return fontsLoaded?_react.default.createElement(_reactNative.TouchableOpacity,{style:{minWidth:180,width:'max-content'},onPress:function onPress(){},style:[styles.button,{backgroundColor:color.default.background,borderColor:color.default.border,borderWidth:1.5}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:11,columnNumber:5}},_react.default.createElement(_reactNative.Text,{style:[styles.text,{color:color.default.text,fontFamily:'TELUS-web-medium'}],__self:_this,__source:{fileName:_jsxFileName,lineNumber:23,columnNumber:7}},children)):_react.default.createElement(_reactNative.View,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:33,columnNumber:5}},_react.default.createElement(_reactNative.Text,{__self:_this,__source:{fileName:_jsxFileName,lineNumber:34,columnNumber:7}},"Loading"));};var styles=_reactNative.StyleSheet.create({button:_sharedStyle.button,text:_sharedStyle.text});Button.propTypes={type:_propTypes.default.oneOf(['button','submit','reset']),variant:_propTypes.default.oneOf(['primary','secondary','inverted','standard','brand','danger']),children:_propTypes.default.string};Button.defaultProps={type:'button',variant:'primary'};var _default=Button;exports.default=_default;

@@ -1,1 +0,1 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _this=this,_jsxFileName="/Users/hamedmamdoohi/Desktop/omni-channel-components/packages/Button/src/Button.web.jsx";var Button=function Button(){return _react.default.createElement("button",{style:{backgroundColor:'red'},__self:_this,__source:{fileName:_jsxFileName,lineNumber:4,columnNumber:10}},"button");};var _default=Button;exports.default=_default;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireDefault(require("react"));var _propTypes=_interopRequireDefault(require("prop-types"));var _styledComponents=_interopRequireDefault(require("styled-components"));var _sharedStyle=require("./sharedStyle");var _this=this,_jsxFileName="/Users/hamedmamdoohi/Desktop/react-native-storybook/packages/Button/src/Button.web.jsx";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){(0,_defineProperty2.default)(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;}var StyledButton=(0,_styledComponents.default)('button')(function(_ref){var variant=_ref.variant;var color=(0,_sharedStyle.setColorByVariant)(variant);return"\n border: 2px solid "+color.default.border+" !important;\n background-color: "+color.default.background+" !important;\n color: "+color.default.text+" !important;\n &[style] {\n :hover {\n border: 2px solid "+color.hover.border+" !important;\n background-color: "+color.hover.background+" !important;\n color: "+color.hover.text+" !important;\n cursor: pointer;\n }\n :active {\n background-color: "+color.active.background+" !important;\n color: "+color.active.text+" !important;\n box-shadow: 0 0 0 3px "+color.active.boxShadow+" !important;\n }\n :focus {\n outline: 0 !important;\n background-color: "+color.focus.background+" !important;\n box-shadow: 0 0 0 3px "+color.focus.boxShadow+" !important;\n \n color: "+color.focus.text+" !important;\n border: 2px solid "+color.focus.border+" !important;\n \n }\n :active:focus {\n background-color: "+color.activeFocus.background+" !important;\n box-shadow: 0 0 0 3px "+color.activeFocus.boxShadow+" !important;\n color: "+color.activeFocus.text+" !important;\n border: 2px solid "+color.activeFocus.border+" !important;\n }\n }\n ";});var Button=function Button(_ref2){var variant=_ref2.variant,children=_ref2.children;return _react.default.createElement(StyledButton,{variant:variant,style:_objectSpread(_objectSpread({fontFamily:'TELUS-web',fontWeight:400,letterSpacing:'normal'},_sharedStyle.text),_sharedStyle.button),__self:_this,__source:{fileName:_jsxFileName,lineNumber:45,columnNumber:5}},children);};Button.propTypes={type:_propTypes.default.oneOf(['button','submit','reset']),variant:_propTypes.default.oneOf(['primary','secondary','inverted','standard','brand','danger']),children:_propTypes.default.string};Button.defaultProps={type:'button',variant:'primary'};var _default=Button;exports.default=_default;
{
"name": "@tds2/button",
"version": "0.1.24",
"version": "0.1.25",
"description": "Button component",

@@ -9,3 +9,3 @@ "keywords": [

"author": "TELUS Digital",
"homepage": "https://github.com/telus/omni-channel-design-system-poc#readme",
"homepage": "",
"license": "ISC",

@@ -28,3 +28,7 @@ "main": "lib/index.js",

},
"dependencies": {
"@tds2/colours": "^0.1.1"
},
"peerDependencies": {
"prop-types": "^15.7.2",
"react": "^16.8.0"

@@ -41,3 +45,3 @@ },

},
"gitHead": "64c61e366d765b1df97e3b5b4acb6fc2f62b0fa0"
"gitHead": "393db4408832e5db83be0a9696c3c49ac112f672"
}
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