-
-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding a new expanded mode to the playground
- Loading branch information
1 parent
9664098
commit 45af6f4
Showing
10 changed files
with
180 additions
and
93 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
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
16 changes: 11 additions & 5 deletions
16
website/src/pages/playground/chat/manipulate/playgroundAddButton.js
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,15 +1,21 @@ | ||
import './playgroundAddButton.css'; | ||
import React from 'react'; | ||
|
||
export default function AddButton({isGrid, addComponent}) { | ||
export default function AddButton({viewMode, addComponent}) { | ||
return ( | ||
<div | ||
id="playground-add-button-container" | ||
className={isGrid ? 'playground-add-button-container-grid' : 'playground-add-button-container-panorama'} | ||
> | ||
<div id="playground-add-button-container" className={viewModeToClass[viewMode]}> | ||
<div id="playground-add-button" className="start-panel-logo" onClick={() => addComponent()}> | ||
<img src="/img/plus.svg" id="playground-add-button-image" className="playground-button"></img> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
// 1 - grid | ||
// 2 - panorama | ||
// 3 - expanded | ||
const viewModeToClass = { | ||
1: 'playground-add-button-container-grid', | ||
2: 'playground-add-button-container-panorama', | ||
3: 'playground-add-button-container-expanded', | ||
}; |
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
Oops, something went wrong.