Skip to content

Commit

Permalink
fix: #space fixup due to .dnb-core-style and css margins reset
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Jul 21, 2019
1 parent 6c138b8 commit c7cafc6
Show file tree
Hide file tree
Showing 5 changed files with 531 additions and 391 deletions.
7 changes: 2 additions & 5 deletions packages/dnb-ui-lib/src/components/space/Space.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
import {
isTrue,
extend,
extendPropsWithContext,
registerElement,
Expand All @@ -23,7 +22,6 @@ const renderProps = {
export const propTypes = {
id: PropTypes.string,
element: PropTypes.string,
inline: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
top: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
right: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
bottom: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
Expand All @@ -45,7 +43,6 @@ export const propTypes = {
export const defaultProps = {
id: null,
element: 'div',
inline: false,
top: null,
right: null,
bottom: null,
Expand Down Expand Up @@ -93,7 +90,6 @@ export default class Space extends PureComponent {

let {
element,
inline,
top,
right,
bottom,
Expand All @@ -112,7 +108,6 @@ export default class Space extends PureComponent {
const params = {
className: classnames(
'dnb-space',
isTrue(inline) && 'dnb-space--inline',
createSpacingClasses({ top, right, bottom, left }),
className,
_className
Expand Down Expand Up @@ -140,6 +135,8 @@ export default class Space extends PureComponent {
}
})

// const Element = element

return (
<Context.Provider value={context}>
<Element element={element} {...params}>
Expand Down
Loading

0 comments on commit c7cafc6

Please sign in to comment.