@rpg-engine/long-bow 0.6.77 → 0.6.78

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.6.77",
3
+ "version": "0.6.78",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -10,6 +10,8 @@ export interface IDraggableContainerProps {
10
10
  children: React.ReactNode;
11
11
  width?: string;
12
12
  height?: string;
13
+ minWidth?: string;
14
+ minHeight?: string;
13
15
  className?: string;
14
16
  type?: RPGUIContainerTypes;
15
17
  title?: string;
@@ -32,6 +34,8 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
32
34
  children,
33
35
  width = '50%',
34
36
  height,
37
+ minHeight,
38
+ minWidth,
35
39
  className,
36
40
  type = RPGUIContainerTypes.FramedGold,
37
41
  onCloseButton,
@@ -109,6 +113,8 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
109
113
  ref={draggableRef}
110
114
  width={width}
111
115
  height={height || 'auto'}
116
+ minWidth={minWidth}
117
+ minHeight={minHeight}
112
118
  className={`rpgui-container ${type} ${className}`}
113
119
  isFullScreen={isFullScreen}
114
120
  opacity={opacity}
@@ -139,6 +145,8 @@ export const DraggableContainer: React.FC<IDraggableContainerProps> = ({
139
145
  interface IContainerProps {
140
146
  width: string;
141
147
  height: string;
148
+ minWidth?: string;
149
+ minHeight?: string;
142
150
  isFullScreen?: boolean;
143
151
  opacity?: number;
144
152
  }
@@ -146,6 +154,8 @@ interface IContainerProps {
146
154
  const Container = styled.div<IContainerProps>`
147
155
  height: ${props => props.height};
148
156
  width: ${({ width }) => width};
157
+ min-width: ${({ minWidth }) => minWidth || 'auto'};
158
+ min-height: ${({ minHeight }) => minHeight || 'auto'};
149
159
  display: flex;
150
160
  flex-wrap: wrap;
151
161
  image-rendering: pixelated;
@@ -204,10 +214,10 @@ interface ICustomIconProps {
204
214
  width: string;
205
215
  }
206
216
 
207
- const Icon = styled.img`
217
+ const Icon = styled.img<ICustomIconProps>`
208
218
  color: white;
209
219
  z-index: 22;
210
220
  font-size: ${uiFonts.size.xsmall};
211
- width: ${(props: ICustomIconProps) => props.width};
221
+ width: ${({ width }) => width};
212
222
  margin-right: 0.5rem;
213
223
  `;
@@ -21,6 +21,8 @@ export interface ITabsContainer {
21
21
  type: MultitabType;
22
22
  styles?: {
23
23
  width?: string;
24
+ minWidth?: string;
25
+ minHeight?: string;
24
26
  height?: string;
25
27
  className?: string;
26
28
  title?: string;
@@ -67,6 +69,8 @@ export const TabsContainer: React.FC<ITabsContainer> = ({
67
69
  cancelDrag=".tabs-container *" // Disable drag on all elements inside .tabs-container
68
70
  width={styles?.width} // use optional chaining
69
71
  height={styles?.height}
72
+ minWidth={styles?.minWidth}
73
+ minHeight={styles?.minHeight}
70
74
  className={styles?.className}
71
75
  title={styles?.title}
72
76
  imgSrc={styles?.imgSrc}