You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
575 B
23 lines
575 B
import React from "react"; |
|
import { Box, Text } from "grommet"; |
|
import { StatusGoodSmall } from "grommet-icons"; |
|
|
|
import { stateToColor } from "../../utils/indi"; |
|
|
|
const LightVector = ({ vector }) => { |
|
return ( |
|
<Box gap="xsmall"> |
|
{vector.values.map((v) => ( |
|
<Box key={v.name} direction="row" align="center" gap="small"> |
|
<StatusGoodSmall |
|
size="medium" |
|
color={stateToColor(v.light)} |
|
/> |
|
<Box><Text>{v.label || v.name}</Text></Box> |
|
</Box> |
|
))} |
|
</Box> |
|
); |
|
}; |
|
|
|
export default LightVector;
|
|
|