@rpg-engine/long-bow 0.5.3 → 0.5.4
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/ImageCarousel/ImageCarousel.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +16 -8
- 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 +16 -8
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ImageCarousel/ImageCarousel.tsx +20 -0
package/package.json
CHANGED
|
@@ -14,11 +14,13 @@ export interface ITextImageProps {
|
|
|
14
14
|
export interface IImageCarouselProps {
|
|
15
15
|
textImage: ITextImageProps[];
|
|
16
16
|
isTextFixed: boolean;
|
|
17
|
+
onCloseButton?: () => void;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export const ImageCarousel: React.FC<IImageCarouselProps> = ({
|
|
20
21
|
textImage,
|
|
21
22
|
isTextFixed,
|
|
23
|
+
onCloseButton,
|
|
22
24
|
}) => {
|
|
23
25
|
const [textImageSelected, setTextImageSelected] = useState(textImage[0]);
|
|
24
26
|
|
|
@@ -94,6 +96,11 @@ export const ImageCarousel: React.FC<IImageCarouselProps> = ({
|
|
|
94
96
|
</ArrowContainer>
|
|
95
97
|
</BackgroundImage>
|
|
96
98
|
)}
|
|
99
|
+
{onCloseButton && (
|
|
100
|
+
<CloseButton className="container-close" onPointerDown={onCloseButton}>
|
|
101
|
+
X
|
|
102
|
+
</CloseButton>
|
|
103
|
+
)}
|
|
97
104
|
</CarouselWrapper>
|
|
98
105
|
);
|
|
99
106
|
};
|
|
@@ -140,3 +147,16 @@ const Description = styled.div<ITextDescription>`
|
|
|
140
147
|
height: auto;
|
|
141
148
|
}
|
|
142
149
|
`;
|
|
150
|
+
|
|
151
|
+
const CloseButton = styled.div`
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: 3px;
|
|
154
|
+
right: 0px;
|
|
155
|
+
color: white;
|
|
156
|
+
z-index: 22;
|
|
157
|
+
font-size: 1.5rem;
|
|
158
|
+
@media (max-width: 950px) {
|
|
159
|
+
font-size: 1.7rem;
|
|
160
|
+
padding: 12px;
|
|
161
|
+
}
|
|
162
|
+
`;
|