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

brainly-style-guide

Package Overview
Dependencies
Maintainers
7
Versions
326
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

brainly-style-guide - npm Package Compare versions

Comparing version 157.0.3 to 157.1.0

8

commonjs/components/toplayer/TopLayer.js

@@ -46,3 +46,4 @@ "use strict";

className = props.className,
additionalProps = _objectWithoutProperties(props, ["children", "onClose", "size", "lead", "fill", "modal", "withBugbox", "smallSpaced", "splashScreen", "limitedWidth", "row", "noPadding", "transparent", "className"]);
onCloseButtonKeyDown = props.onCloseButtonKeyDown,
additionalProps = _objectWithoutProperties(props, ["children", "onClose", "size", "lead", "fill", "modal", "withBugbox", "smallSpaced", "splashScreen", "limitedWidth", "row", "noPadding", "transparent", "className", "onCloseButtonKeyDown"]);

@@ -67,3 +68,6 @@ var topLayerClassName = (0, _classnames2.default)('sg-toplayer', _defineProperty({

className: "sg-toplayer__close",
onClick: onClose
onClick: onClose,
onKeyDown: onCloseButtonKeyDown,
role: "button",
tabIndex: "0"
}, _react.default.createElement(_Icon.default, {

@@ -70,0 +74,0 @@ type: "close",

@@ -28,3 +28,4 @@ import _extends from "@babel/runtime/helpers/esm/extends";

className = props.className,
additionalProps = _objectWithoutProperties(props, ["children", "onClose", "size", "lead", "fill", "modal", "withBugbox", "smallSpaced", "splashScreen", "limitedWidth", "row", "noPadding", "transparent", "className"]);
onCloseButtonKeyDown = props.onCloseButtonKeyDown,
additionalProps = _objectWithoutProperties(props, ["children", "onClose", "size", "lead", "fill", "modal", "withBugbox", "smallSpaced", "splashScreen", "limitedWidth", "row", "noPadding", "transparent", "className", "onCloseButtonKeyDown"]);

@@ -49,3 +50,6 @@ var topLayerClassName = classnames('sg-toplayer', _defineProperty({

className: "sg-toplayer__close",
onClick: onClose
onClick: onClose,
onKeyDown: onCloseButtonKeyDown,
role: "button",
tabIndex: "0"
}, React.createElement(Icon, {

@@ -52,0 +56,0 @@ type: "close",

{
"name": "brainly-style-guide",
"version": "157.0.3",
"version": "157.1.0",
"description": "Brainly Front-End Style Guide",

@@ -5,0 +5,0 @@ "repository": "https://github.com/brainly/style-guide.git",

@@ -19,2 +19,5 @@ // @flow strict

onClose?: (SyntheticMouseEvent<HTMLDivElement>) => mixed,
onCloseButtonKeyDown?: (
event: SyntheticKeyboardEvent<HTMLInputElement>
) => mixed,
lead?: boolean,

@@ -51,2 +54,3 @@ fill?: boolean,

className,
onCloseButtonKeyDown,
...additionalProps

@@ -79,3 +83,9 @@ } = props;

{onClose ? (
<div className="sg-toplayer__close" onClick={onClose}>
<div
className="sg-toplayer__close"
onClick={onClose}
onKeyDown={onCloseButtonKeyDown}
role="button"
tabIndex="0"
>
<Icon type="close" color="gray-secondary" size={24} />

@@ -82,0 +92,0 @@ </div>

@@ -41,2 +41,13 @@ import React from 'react';

test('key down action', () => {
const mockCallback = jest.fn();
const topLayer = mount(
<TopLayer onClose={mockCallback} onCloseButtonKeyDown={mockCallback} />
);
const button = topLayer.find('.sg-toplayer__close');
button.simulate('keyDown');
expect(mockCallback.mock.calls).toHaveLength(1);
});
test('size', () => {

@@ -43,0 +54,0 @@ const size = SIZE.SMALL;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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