@rpg-engine/long-bow 0.1.72 → 0.1.75

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": "@rpg-engine/long-bow",
3
- "version": "0.1.72",
3
+ "version": "0.1.75",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -55,45 +55,44 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
55
55
  }, []);
56
56
 
57
57
  return (
58
- <div ref={draggableRef}>
59
- <Draggable
60
- cancel={`.container-close,${cancelDrag}`}
61
- onDrag={(_e, data: DraggableData) => {
62
- if (onPositionChange) {
63
- onPositionChange({
64
- x: data.x,
65
- y: data.y,
66
- });
67
- }
68
- }}
58
+ <Draggable
59
+ cancel={`.container-close,${cancelDrag}`}
60
+ onDrag={(_e, data: DraggableData) => {
61
+ if (onPositionChange) {
62
+ onPositionChange({
63
+ x: data.x,
64
+ y: data.y,
65
+ });
66
+ }
67
+ }}
68
+ >
69
+ <Container
70
+ ref={draggableRef}
71
+ width={width}
72
+ height={height || 'auto'}
73
+ className={`rpgui-container ${type} ${className}`}
69
74
  >
70
- <Container
71
- width={width}
72
- height={height || 'auto'}
73
- className={`rpgui-container ${type} ${className}`}
74
- >
75
- {title && (
76
- <TitleContainer className="drag-handler">
77
- <Title>
78
- {imgSrc && <Icon src={imgSrc} width={imgWidth} />}
79
- {title}
80
- </Title>
81
- </TitleContainer>
82
- )}
83
- {onCloseButton && (
84
- <CloseButton
85
- className="container-close"
86
- onClick={onCloseButton}
87
- onTouchStart={onCloseButton}
88
- >
89
- X
90
- </CloseButton>
91
- )}
92
-
93
- {children}
94
- </Container>
95
- </Draggable>
96
- </div>
75
+ {title && (
76
+ <TitleContainer className="drag-handler">
77
+ <Title>
78
+ {imgSrc && <Icon src={imgSrc} width={imgWidth} />}
79
+ {title}
80
+ </Title>
81
+ </TitleContainer>
82
+ )}
83
+ {onCloseButton && (
84
+ <CloseButton
85
+ className="container-close"
86
+ onClick={onCloseButton}
87
+ onTouchStart={onCloseButton}
88
+ >
89
+ X
90
+ </CloseButton>
91
+ )}
92
+
93
+ {children}
94
+ </Container>
95
+ </Draggable>
97
96
  );
98
97
  };
99
98