@rpg-engine/long-bow 0.8.40 → 0.8.42
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/long-bow.cjs.development.js +26 -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 +26 -8
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.tsx +2 -2
- package/src/components/shared/SearchHeader/SearchHeader.tsx +20 -10
package/package.json
CHANGED
package/src/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.tsx
CHANGED
|
@@ -19,8 +19,8 @@ interface ITutorialsSectionProps {
|
|
|
19
19
|
tabId: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const ITEMS_PER_PAGE =
|
|
23
|
-
const GRID_COLUMNS =
|
|
22
|
+
const ITEMS_PER_PAGE = 4;
|
|
23
|
+
const GRID_COLUMNS = 4;
|
|
24
24
|
|
|
25
25
|
export const InformationCenterTutorialsSection: React.FC<ITutorialsSectionProps> = ({
|
|
26
26
|
videoGuides,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isMobileOrTablet } from '@rpg-engine/shared';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import { Dropdown, IOptionsProps } from '../../Dropdown';
|
|
@@ -25,25 +26,32 @@ export const SearchHeader: React.FC<ISearchHeaderProps> = ({
|
|
|
25
26
|
}) => {
|
|
26
27
|
if (!searchOptions && !filterOptions) return null;
|
|
27
28
|
|
|
29
|
+
const isMobile = isMobileOrTablet();
|
|
30
|
+
const isSmallScreen = isMobile && window.innerWidth < 480;
|
|
31
|
+
|
|
28
32
|
return (
|
|
29
33
|
<HeaderContainer className={className}>
|
|
30
|
-
<HeaderContent>
|
|
34
|
+
<HeaderContent $isSmallScreen={isSmallScreen}>
|
|
31
35
|
{searchOptions && (
|
|
32
36
|
<SearchContainer>
|
|
33
37
|
<StyledSearchBar
|
|
34
38
|
value={searchOptions.value}
|
|
35
39
|
onChange={searchOptions.onChange}
|
|
36
|
-
placeholder={
|
|
40
|
+
placeholder={
|
|
41
|
+
isSmallScreen
|
|
42
|
+
? 'Search...'
|
|
43
|
+
: searchOptions.placeholder || 'Search...'
|
|
44
|
+
}
|
|
37
45
|
rightElement={searchOptions.rightElement}
|
|
38
46
|
/>
|
|
39
47
|
</SearchContainer>
|
|
40
48
|
)}
|
|
41
49
|
{filterOptions && (
|
|
42
|
-
<FilterContainer>
|
|
50
|
+
<FilterContainer $isSmallScreen={isSmallScreen}>
|
|
43
51
|
<StyledDropdown
|
|
44
52
|
options={filterOptions.options}
|
|
45
53
|
onChange={filterOptions.onOptionChange}
|
|
46
|
-
width=
|
|
54
|
+
width={isSmallScreen ? '100%' : '200px'}
|
|
47
55
|
/>
|
|
48
56
|
</FilterContainer>
|
|
49
57
|
)}
|
|
@@ -54,13 +62,14 @@ export const SearchHeader: React.FC<ISearchHeaderProps> = ({
|
|
|
54
62
|
|
|
55
63
|
const HeaderContainer = styled.div``;
|
|
56
64
|
|
|
57
|
-
const HeaderContent = styled.div
|
|
65
|
+
const HeaderContent = styled.div<{ $isSmallScreen?: boolean }>`
|
|
58
66
|
display: flex;
|
|
67
|
+
flex-direction: ${props => (props.$isSmallScreen ? 'column' : 'row')};
|
|
59
68
|
justify-content: space-between;
|
|
60
|
-
align-items: center;
|
|
61
|
-
gap: 1rem;
|
|
69
|
+
align-items: ${props => (props.$isSmallScreen ? 'stretch' : 'center')};
|
|
70
|
+
gap: ${props => (props.$isSmallScreen ? '0.5rem' : '1rem')};
|
|
62
71
|
background: rgba(0, 0, 0, 0.2);
|
|
63
|
-
padding: 1rem;
|
|
72
|
+
padding: ${props => (props.$isSmallScreen ? '0.5rem' : '1rem')};
|
|
64
73
|
border-radius: 4px;
|
|
65
74
|
`;
|
|
66
75
|
|
|
@@ -68,9 +77,10 @@ const SearchContainer = styled.div`
|
|
|
68
77
|
flex: 1;
|
|
69
78
|
`;
|
|
70
79
|
|
|
71
|
-
const FilterContainer = styled.div
|
|
80
|
+
const FilterContainer = styled.div<{ $isSmallScreen?: boolean }>`
|
|
72
81
|
display: flex;
|
|
73
|
-
justify-content: flex-end;
|
|
82
|
+
justify-content: ${props => (props.$isSmallScreen ? 'stretch' : 'flex-end')};
|
|
83
|
+
width: ${props => (props.$isSmallScreen ? '100%' : 'auto')};
|
|
74
84
|
`;
|
|
75
85
|
|
|
76
86
|
const StyledSearchBar = styled(SearchBar)`
|