@brushes/component-core 1.0.9 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brushes/component-core",
3
- "version": "1.0.9",
3
+ "version": "1.1.1",
4
4
  "main": "src/index.ts",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -155,7 +155,7 @@ export const Container = ({ width, text, children, background, margin = {}, posi
155
155
  ...props,
156
156
  ...positionNewValue,
157
157
  background: backgroundImage ? `url(${fullpath(backgroundImage)}) repeat-x center 0` : background,
158
- width: (width + '').includes('%') ? width : `${width}px`
158
+ width: ((width + '').includes('%') || (width + '').includes('px')) ? width : `${width}px`
159
159
  }}
160
160
  >
161
161
  <Inner text={text} enabled={enabled}>
@@ -186,7 +186,7 @@ export const OutContainerComponent = ({ width, api, params, children, background
186
186
  ...padding,
187
187
  ...props,
188
188
  background: backgroundImage ? `url(${fullpath(backgroundImage)}) repeat-x center 0` : background,
189
- width: (width + '').includes('%') ? width : `${width}px`
189
+ width: ((width + '').includes('%') || (width + '').includes('px')) ? width : `${width}px`
190
190
  }}
191
191
  >
192
192
  <Inner enabled={enabled}>{children}</Inner>
@@ -214,7 +214,7 @@ export const ContainerWrap = ({ width, background, children, backgroundImage, he
214
214
  {...props}
215
215
  ref={(ref: HTMLDivElement) => connect(drag(ref))}
216
216
  style={{
217
- width,
217
+ width: ((width + '').includes('%') || (width + '').includes('px')) ? width : `${width}px`,
218
218
  paddingBottom: 5,
219
219
  background: backgroundImage ? `url(${fullpath(backgroundImage)}) repeat-x center 0` : background,
220
220
  minHeight: `calc(${height}vh - 110px)`