Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Oct 9, 2020
1 parent a5fe6fc commit 3a4e160
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/StyleWrapper/StyleWrapperView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,18 @@ const StyleWrapperView = (props) => {

const style = getStyle(style_name);
const inlineStyles = getInlineStyles(styleData);
const addStyles =
Object.keys(inlineStyles).length > 0 || style || align || size;
const styled = Object.keys(inlineStyles).length > 0 || style || align || size;

const attrs = {
className: cx(style?.cssClass, { align, styled: addStyles }, align, {
style: inlineStyles,
className: cx(style?.cssClass, align, {
align,
styled,
'full-width': align === 'full',
large: size === 'l',
medium: size === 'm',
small: size === 's',
}),
style: inlineStyles,
};

const nativeIntegration =
Expand All @@ -52,7 +53,7 @@ const StyleWrapperView = (props) => {

const ViewComponentWrapper = style?.viewComponent;

return addStyles ? (
return styled ? (
nativeIntegration ? (
children
) : (
Expand Down

0 comments on commit 3a4e160

Please sign in to comment.