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

terra-action-footer

Package Overview
Dependencies
Maintainers
10
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terra-action-footer - npm Package Compare versions

Comparing version 2.41.0 to 2.42.0

lib/clinical-lowlight-theme/BlockActionFooter.module.scss

5

CHANGELOG.md

@@ -7,2 +7,7 @@ ChangeLog

2.42.0 - (May 12, 2020)
------------------
### Changed
* Apply themes by context and directly include packaged themes.
2.41.0 - (May 5, 2020)

@@ -9,0 +14,0 @@ ------------------

10

lib/BlockActionFooter.js

@@ -12,4 +12,8 @@ "use strict";

var _classnames = _interopRequireDefault(require("classnames"));
var _bind = _interopRequireDefault(require("classnames/bind"));
var _terraThemeContext = _interopRequireDefault(require("terra-theme-context"));
var _BlockActionFooterModule = _interopRequireDefault(require("./BlockActionFooter.module.scss"));

@@ -38,6 +42,8 @@

var theme = _react.default.useContext(_terraThemeContext.default);
var isEmpty = !_react.default.Children.toArray(children).length;
var blockActionFooterClassNames = cx(['block-action-footer', {
var blockActionFooterClassNames = (0, _classnames.default)(cx(['block-action-footer', {
'with-actions': !isEmpty
}, customProps.className]);
}, theme.className]), customProps.className);
return /*#__PURE__*/_react.default.createElement("div", _extends({}, customProps, {

@@ -44,0 +50,0 @@ className: blockActionFooterClassNames

7

package.json
{
"name": "terra-action-footer",
"main": "lib/ActionFooter.js",
"version": "2.41.0",
"version": "2.42.0",
"description": "The terra-action-footer component is a footer bar that contains sockets for placing actionable items such as buttons and hyperlinks. The default variation contains a start and end socket, while the centered variation has only a center socket. If no actions are provided, the footer bar collapses to a themeable height and maintains the top border.",

@@ -33,3 +33,4 @@ "repository": {

"terra-hyperlink": "^2.32.0",
"terra-spacer": "^3.37.0"
"terra-spacer": "^3.37.0",
"terra-theme-context": "^1.0.0"
},

@@ -49,3 +50,3 @@ "scripts": {

},
"gitHead": "e48fecfbfb1f51fbad7c34f9aaf8c6b544e9a784"
"gitHead": "cd1ff2a4eda29511aab8317b54aadca8a0d76b09"
}
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames/bind';
import classNames from 'classnames';
import classNamesBind from 'classnames/bind';
import ThemeContext from 'terra-theme-context';
import styles from './BlockActionFooter.module.scss';
const cx = classNames.bind(styles);
const cx = classNamesBind.bind(styles);

@@ -20,9 +22,13 @@ const propTypes = {

}) => {
const theme = React.useContext(ThemeContext);
const isEmpty = !React.Children.toArray(children).length;
const blockActionFooterClassNames = cx([
'block-action-footer',
{ 'with-actions': !isEmpty },
const blockActionFooterClassNames = classNames(
cx([
'block-action-footer',
{ 'with-actions': !isEmpty },
theme.className,
]),
customProps.className,
]);
);

@@ -29,0 +35,0 @@ return (

@@ -162,2 +162,16 @@ import React from 'react';

});
it('correctly applies the theme context className', () => {
jest.spyOn(React, 'useContext')
.mockReturnValue({
className: 'orion-fusion-theme',
});
const component = mount(
<ActionFooter
start={<button type="button">Start Button</button>}
end={<button type="button">End Button</button>}
/>,
);
expect(component).toMatchSnapshot();
});
});

@@ -69,2 +69,16 @@ import React from 'react';

});
it('correctly applies the theme context className', () => {
jest.spyOn(React, 'useContext')
.mockReturnValue({
className: 'orion-fusion-theme',
});
const component = mount(
<BlockActionFooter
start={<button type="button">Start Button</button>}
end={<button type="button">End Button</button>}
/>,
);
expect(component).toMatchSnapshot();
});
});

@@ -77,2 +77,11 @@ import React from 'react';

});
it('correctly applies the theme context className', () => {
jest.spyOn(React, 'useContext')
.mockReturnValue({
className: 'orion-fusion-theme',
});
const component = mount(<CenteredActionFooter center="Center Action" />);
expect(component).toMatchSnapshot();
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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