Socket
Socket
Sign inDemoInstall

@semcore/flex-box

Package Overview
Dependencies
Maintainers
1
Versions
235
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semcore/flex-box - npm Package Compare versions

Comparing version 4.4.2 to 4.4.3

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

## [4.4.3] - 2021-10-20
### Fixed
- [TS] Fixed type `direction` for `Flex`.
## [4.4.2] - 2021-10-13

@@ -7,0 +13,0 @@

6

lib/cjs/Flex/useFlex.js

@@ -45,2 +45,6 @@ "use strict";

function calculateFlexStyles(props) {
var DirectionReverse = {
row: 'row-reverse',
column: 'column-reverse'
};
return (0, _useBox3.removeUndefinedKeys)({

@@ -51,3 +55,3 @@ alignItems: props.alignItems,

flexWrap: props.flexWrap ? "wrap".concat(props.reverse ? '-reverse' : '') : undefined,
flexDirection: props.reverse ? "".concat(props.direction || 'row', "-reverse") : props.direction
flexDirection: props.reverse && DirectionReverse[props.direction] || props.direction
});

@@ -54,0 +58,0 @@ }

@@ -31,2 +31,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";

function calculateFlexStyles(props) {
var DirectionReverse = {
row: 'row-reverse',
column: 'column-reverse'
};
return removeUndefinedKeys({

@@ -37,3 +41,3 @@ alignItems: props.alignItems,

flexWrap: props.flexWrap ? "wrap".concat(props.reverse ? '-reverse' : '') : undefined,
flexDirection: props.reverse ? "".concat(props.direction || 'row', "-reverse") : props.direction
flexDirection: props.reverse && DirectionReverse[props.direction] || props.direction
});

@@ -40,0 +44,0 @@ }

4

lib/types/Flex/useFlex.d.ts
import React from 'react';
import { AlignContentProperty, AlignItemsProperty, JustifyContentProperty } from 'csstype';
import { AlignContentProperty, AlignItemsProperty, JustifyContentProperty, FlexDirectionProperty } from 'csstype';
import { IBoxProps } from '../Box/useBox';

@@ -20,3 +20,3 @@ export interface IFlexProps extends IBoxProps {

*/
direction?: 'row' | 'column';
direction?: FlexDirectionProperty;
/**

@@ -23,0 +23,0 @@ * It manages the `align-items` property

{
"name": "@semcore/flex-box",
"description": "SEMRush FlexBox Component",
"version": "4.4.2",
"version": "4.4.3",
"main": "lib/cjs/index.js",

@@ -6,0 +6,0 @@ "module": "lib/es6/index.js",

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