-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7282e40
commit 9daceb5
Showing
13 changed files
with
364 additions
and
174 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react'; | ||
|
||
// Define the ColorLegend component | ||
const ColorLegend = ({ colors }) => { | ||
return ( | ||
<div style={{ display: 'flex', flexWrap: 'wrap', alignItems: 'center' }}> | ||
{colors.map((item, index) => ( | ||
<div key={index} style={{ display: 'flex', alignItems: 'center', marginRight: '20px' }}> | ||
<div | ||
style={{ | ||
width: '20px', | ||
height: '20px', | ||
backgroundColor: item.color, | ||
marginRight: '5px' | ||
}} | ||
/> | ||
<span>{item.label}</span> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
// Example usage of the ColorLegend component | ||
const ScaffEdgeLegend = () => { | ||
const colorArray = [ | ||
{ color: '#99ccff', label: 'Fragment' }, // Muted Blue | ||
{ color: '#ff9999', label: 'Generic' }, // Muted Red | ||
{ color: '#99ff99', label: 'GenericBond' }, // Muted Green | ||
{ color: '#666666', label: 'RemoveAttachment' }, // Dark Gray | ||
{ color: '#cccc66', label: 'Other' } // Muted Yellow | ||
]; | ||
|
||
return ( | ||
<div> | ||
<ColorLegend colors={colorArray} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ScaffEdgeLegend; |
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
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.