-
-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve mobile view on scene list (#2176)
- Loading branch information
1 parent
6a1779d
commit dfff5d2
Showing
5 changed files
with
82 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
import SceneCard from './SceneCard'; | ||
|
||
const SceneCards = ({ children, ...props }) => ( | ||
<div class="row row-cards p-3 align-items-stretch"> | ||
{props.scenes.map((scene, index) => ( | ||
<SceneCard {...props} scene={scene} index={index} /> | ||
))} | ||
</div> | ||
<> | ||
<div class="d-block d-lg-none list-group list-group-flush"> | ||
{/* Only visible on small screens */} | ||
{props.scenes.map((scene, index) => ( | ||
<SceneCard {...props} scene={scene} index={index} showMobileView /> | ||
))} | ||
</div> | ||
<div class="d-none d-lg-block "> | ||
<div class="row row-cards p-3 align-items-stretch"> | ||
{/* Only visible on bigger screens */} | ||
{props.scenes.map((scene, index) => ( | ||
<SceneCard {...props} scene={scene} index={index} showMobileView={false} /> | ||
))} | ||
</div> | ||
</div> | ||
</> | ||
); | ||
|
||
export default SceneCards; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters