@rpg-engine/long-bow 0.2.47 → 0.2.48
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/dist/components/shared/Ellipsis.d.ts +3 -2
- package/dist/long-bow.cjs.development.js +15 -12
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +15 -12
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +1 -1
- package/src/components/PropertySelect/PropertySelect.tsx +7 -5
- package/src/components/TradingMenu/TradingItemRow.tsx +5 -3
- package/src/components/shared/Ellipsis.tsx +9 -8
package/package.json
CHANGED
|
@@ -92,7 +92,7 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
92
92
|
if (stackQty > 1) {
|
|
93
93
|
return (
|
|
94
94
|
<ItemQtyContainer key={`qty-${itemId}`}>
|
|
95
|
-
<Ellipsis maxLines={1} maxWidth=
|
|
95
|
+
<Ellipsis maxLines={1} maxWidth="48px">
|
|
96
96
|
<ItemQty
|
|
97
97
|
className={
|
|
98
98
|
isFractionalStackQty || isLargerThan999 ? 'small' : 'regular'
|
|
@@ -51,11 +51,13 @@ export const PropertySelect: React.FC<IPropertySelectProps> = ({
|
|
|
51
51
|
return (
|
|
52
52
|
<Container>
|
|
53
53
|
<TextOverlay>
|
|
54
|
-
<
|
|
55
|
-
<
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
<p>
|
|
55
|
+
<Item>
|
|
56
|
+
<Ellipsis maxLines={1} maxWidth="60%" center>
|
|
57
|
+
{getCurrentSelectionName()}
|
|
58
|
+
</Ellipsis>
|
|
59
|
+
</Item>
|
|
60
|
+
</p>
|
|
59
61
|
</TextOverlay>
|
|
60
62
|
<div className="rpgui-progress-track"></div>
|
|
61
63
|
|
|
@@ -52,9 +52,11 @@ export const TradingItemRow: React.FC<ITradeComponentProps> = ({
|
|
|
52
52
|
</ItemIconContainer>
|
|
53
53
|
<ItemNameContainer>
|
|
54
54
|
<NameValue>
|
|
55
|
-
<
|
|
56
|
-
{
|
|
57
|
-
|
|
55
|
+
<p>
|
|
56
|
+
<Ellipsis maxLines={1} maxWidth="250px">
|
|
57
|
+
{capitalize(traderItem.name)}
|
|
58
|
+
</Ellipsis>
|
|
59
|
+
</p>
|
|
58
60
|
<p>${traderItem.price}</p>
|
|
59
61
|
</NameValue>
|
|
60
62
|
</ItemNameContainer>
|
|
@@ -4,8 +4,9 @@ import styled from 'styled-components';
|
|
|
4
4
|
interface IProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
maxLines: 1 | 2 | 3;
|
|
7
|
-
maxWidth:
|
|
7
|
+
maxWidth: string;
|
|
8
8
|
fontSize?: string;
|
|
9
|
+
center?: boolean;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export const Ellipsis = ({
|
|
@@ -13,29 +14,29 @@ export const Ellipsis = ({
|
|
|
13
14
|
maxLines,
|
|
14
15
|
maxWidth,
|
|
15
16
|
fontSize,
|
|
17
|
+
center,
|
|
16
18
|
}: IProps) => {
|
|
17
19
|
return (
|
|
18
|
-
<Container maxWidth={maxWidth} fontSize={fontSize}>
|
|
20
|
+
<Container maxWidth={maxWidth} fontSize={fontSize} center={center}>
|
|
19
21
|
<div className={`ellipsis-${maxLines}-lines`}>{children}</div>
|
|
20
22
|
</Container>
|
|
21
23
|
);
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
interface IContainerProps {
|
|
25
|
-
maxWidth
|
|
27
|
+
maxWidth?: string;
|
|
26
28
|
fontSize?: string;
|
|
29
|
+
center?: boolean;
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
const Container = styled.div<IContainerProps>`
|
|
30
|
-
p {
|
|
31
|
-
font-size: ${props => props.fontSize || '1rem'};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
33
|
.ellipsis-1-lines {
|
|
35
34
|
white-space: nowrap;
|
|
36
35
|
text-overflow: ellipsis;
|
|
37
36
|
overflow: hidden;
|
|
38
|
-
max-width: ${props => props.maxWidth}
|
|
37
|
+
max-width: ${props => props.maxWidth};
|
|
38
|
+
|
|
39
|
+
${props => props.center && `margin: 0 auto;`}
|
|
39
40
|
}
|
|
40
41
|
.ellipsis-2-lines {
|
|
41
42
|
display: -webkit-box;
|