-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1026 from 3DStreet/style-updates
Style updates
- Loading branch information
Showing
17 changed files
with
664 additions
and
293 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import PropTypes from 'prop-types'; | ||
import PropertyRow from './PropertyRow'; | ||
|
||
const EnviroSidebar = ({ entity }) => { | ||
const componentName = 'street-environment'; | ||
// Check if entity and its components exist | ||
const component = entity?.components?.[componentName]; | ||
|
||
return ( | ||
<div className="enviro-sidebar"> | ||
<div className="enviro-controls"> | ||
<div className="details"> | ||
{component && component.schema && component.data && ( | ||
<> | ||
<PropertyRow | ||
key="preset" | ||
name="preset" | ||
label="Preset" | ||
schema={component.schema['preset']} | ||
data={component.data['preset']} | ||
componentname={componentName} | ||
isSingle={false} | ||
entity={entity} | ||
/> | ||
<PropertyRow | ||
key="backgroundColor" | ||
name="backgroundColor" | ||
label="Background Color" | ||
schema={component.schema['backgroundColor']} | ||
data={component.data['backgroundColor']} | ||
componentname={componentName} | ||
isSingle={false} | ||
entity={entity} | ||
/> | ||
</> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
EnviroSidebar.propTypes = { | ||
entity: PropTypes.object.isRequired | ||
}; | ||
|
||
export default EnviroSidebar; |
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.