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

anchor-ui

Package Overview
Dependencies
Maintainers
4
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anchor-ui - npm Package Compare versions

Comparing version 3.0.9 to 3.0.10

2

admin-badge/styles.js

@@ -19,3 +19,3 @@ 'use strict';

lineHeight: '10px',
padding: '3px',
padding: '2px',
textAlign: 'center',

@@ -22,0 +22,0 @@ borderRadius: '3px',

@@ -51,3 +51,3 @@ 'use strict';

function text(textStyle, active, overrideStyle) {
function text(textStyle, active, textBadge, overrideStyle) {
var style = textStyle;

@@ -59,2 +59,6 @@

if (textBadge) {
style = (0, _combineStyles2.default)(style, { lineHeight: '20px', marginTop: 0 });
}
return (0, _combineStyles2.default)(style, overrideStyle);

@@ -61,0 +65,0 @@ }

@@ -128,2 +128,3 @@ 'use strict';

secondaryText = _props.secondaryText,
textBadge = _props.textBadge,
onClick = _props.onClick,

@@ -142,3 +143,3 @@ active = _props.active,

onNestedListToggle = _props.onNestedListToggle,
custom = _objectWithoutProperties(_props, ['primaryText', 'secondaryText', 'onClick', 'active', 'rightButton', 'avatar', 'badge', 'style', 'primaryTextStyle', 'secondaryTextStyle', 'muted', 'blocked', 'children', 'open', 'onNestedListToggle']);
custom = _objectWithoutProperties(_props, ['primaryText', 'secondaryText', 'textBadge', 'onClick', 'active', 'rightButton', 'avatar', 'badge', 'style', 'primaryTextStyle', 'secondaryTextStyle', 'muted', 'blocked', 'children', 'open', 'onNestedListToggle']);

@@ -186,3 +187,3 @@ var color = this.context.color;

'h1',
{ style: _getStyles2.default.text(_styles2.default.primaryText, active, primaryTextStyle) },
{ style: _getStyles2.default.text(_styles2.default.primaryText, active, null, primaryTextStyle) },
primaryText

@@ -192,3 +193,7 @@ ),

'h2',
{ style: _getStyles2.default.text(_styles2.default.secondaryText, active, secondaryTextStyle) },
{
style: _getStyles2.default.text(_styles2.default.secondaryText, active, textBadge, secondaryTextStyle)
},
textBadge,
' ',
secondaryText

@@ -225,2 +230,4 @@ ) : null,

secondaryText: _propTypes2.default.node,
/** A badge to display before the secondaryText. */
textBadge: _propTypes2.default.node,
/** Override the styles of the root element */

@@ -257,2 +264,3 @@ style: _propTypes2.default.instanceOf(Object),

secondaryText: '',
textBadge: null,
primaryTextStyle: {},

@@ -259,0 +267,0 @@ secondaryTextStyle: {},

@@ -88,3 +88,3 @@ 'use strict';

marginTop: '2.4px',
lineHeight: '22px',
lineHeight: '16px',
userSelect: 'none',

@@ -91,0 +91,0 @@ whiteSpace: 'nowrap',

@@ -37,2 +37,6 @@ 'use strict';

var _combineStyles = require('../../internal/combine-styles');
var _combineStyles2 = _interopRequireDefault(_combineStyles);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -98,2 +102,10 @@

var headerStyle = messageHeaderStyle;
var imageStyle = _styles2.default.image;
if (compact) {
headerStyle = (0, _combineStyles2.default)(headerStyle, { position: 'absolute', bottom: '12px' });
imageStyle = (0, _combineStyles2.default)(imageStyle, { marginBottom: '5px' });
}
return _react2.default.createElement(

@@ -107,3 +119,3 @@ 'div',

fontSize: fontSize,
headerStyle: messageHeaderStyle,
headerStyle: headerStyle,
username: message.username

@@ -114,3 +126,3 @@ }),

{ style: _getStyles2.default.body(myMessage, fontSize, messageBodyStyle) },
_react2.default.createElement('img', { onClick: onClick, style: _styles2.default.image, src: message.body, alt: 'user-upload' }),
_react2.default.createElement('img', { onClick: onClick, style: imageStyle, src: message.body, alt: 'user-upload' }),
_react2.default.createElement(_messageTime2.default, {

@@ -117,0 +129,0 @@ myMessage: myMessage,

@@ -27,2 +27,10 @@ 'use strict';

var _iconMenu = require('../icon-menu');
var _iconMenu2 = _interopRequireDefault(_iconMenu);
var _iconChevronDown = require('../icons/icon-chevron-down');
var _iconChevronDown2 = _interopRequireDefault(_iconChevronDown);
var _getStyles = require('./get-styles');

@@ -62,3 +70,6 @@

return _possibleConstructorReturn(this, (Message.__proto__ || Object.getPrototypeOf(Message)).apply(this, arguments));
var _this = _possibleConstructorReturn(this, (Message.__proto__ || Object.getPrototypeOf(Message)).call(this));
_this.renderIconMenu = _this.renderIconMenu.bind(_this);
return _this;
}

@@ -72,2 +83,18 @@

}, {
key: 'renderIconMenu',
value: function renderIconMenu() {
var menuItems = this.props.menuItems;
if (!menuItems) {
return null;
}
return _react2.default.createElement(
_iconMenu2.default,
{ icon: _react2.default.createElement(_iconChevronDown2.default, null) },
menuItems
);
}
}, {
key: 'render',

@@ -108,3 +135,4 @@ value: function render() {

_extends({ style: _getStyles2.default.container(myMessage, compact) }, custom),
messageElement
messageElement,
this.renderIconMenu()
);

@@ -111,0 +139,0 @@ }

@@ -61,3 +61,3 @@ 'use strict';

function body(myMessage, avatar, overrideStyle) {
function body(myMessage, avatar, compact, overrideStyle) {
var style = _styles2.default.body;

@@ -77,2 +77,6 @@

if (compact) {
style = (0, _combineStyles2.default)(style, { float: 'none', marginLeft: 0, marginRight: 0 });
}
return (0, _combineStyles2.default)(style, overrideStyle);

@@ -79,0 +83,0 @@ }

@@ -55,3 +55,3 @@ 'use strict';

null,
_react2.default.createElement('img', { style: _getStyles2.default.body(myMessage, avatar, messageBodyStyle), src: message.body, alt: 'sticker' }),
_react2.default.createElement('img', { style: _getStyles2.default.body(myMessage, avatar, compact, messageBodyStyle), src: message.body, alt: 'sticker' }),
_react2.default.createElement(

@@ -58,0 +58,0 @@ 'div',

{
"name": "anchor-ui",
"version": "3.0.9",
"version": "3.0.10",
"description": "React Component UI Kit",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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