@semcore/flex-box
Advanced tools
Comparing version 4.4.2 to 4.4.3
@@ -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 @@ |
@@ -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 @@ } |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91134
1145