-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
9eee2fe
commit c5f78b1
Showing
3 changed files
with
99 additions
and
40 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
browser-extension/plugin/src/ui-components/atoms/SlurCard.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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { Box, Text } from 'grommet'; | ||
import SlurCardBubble from './SlurCardBubble'; | ||
|
||
const SlurCard = ({ data }) => { | ||
return ( | ||
<Box> | ||
<Box direction="row" justify="start" align="center"> | ||
<Text margin={{ left: 'xsmall' }} color="#71797E"> | ||
Level of Severity: | ||
</Text> | ||
<Text margin={{ left: 'medium' }}> | ||
{data.level_of_severity} | ||
</Text> | ||
</Box> | ||
<Box direction="row" justify="start" align="center"> | ||
<Text margin={{ left: 'xsmall' }} color="#646464"> | ||
Casual: | ||
</Text> | ||
<Text margin={{ left: 'medium' }}> | ||
{data.casual ? 'Yes' : 'No'} | ||
</Text> | ||
</Box> | ||
<Box direction="row" justify="start" align="center"> | ||
<Text margin={{ left: 'xsmall' }} color="#646464"> | ||
Appropriated: | ||
</Text> | ||
<Text margin={{ left: 'medium' }}> | ||
{data.appropriated ? 'Yes' : 'No'} | ||
</Text> | ||
</Box> | ||
{data.appropriationContext && ( | ||
<Box direction="row" justify="start" align="center"> | ||
<Text margin={{ left: 'xsmall' }} color="#646464"> | ||
If, Appropriated, Is it by Community or Others?: | ||
</Text> | ||
<Text margin={{ left: 'medium' }}> | ||
{data.appropriationContext === 'Community' | ||
? 'Community' | ||
: 'Others'} | ||
</Text> | ||
</Box> | ||
)} | ||
{data.labelMeaning && ( | ||
<Box direction="row" justify="start" align="center"> | ||
<Text margin={{ left: 'xsmall' }} color="#646464"> | ||
What Makes it Problematic?: | ||
</Text> | ||
<Text margin={{ left: 'medium' }}>{data.labelMeaning}</Text> | ||
</Box> | ||
)} | ||
<Box direction="column"> | ||
<Text margin={{ left: 'xsmall' }} color="#646464"> | ||
Categories: | ||
</Text> | ||
<Box direction="row" gap="medium" margin={{top: 'medium', left: 'xsmall'}}> | ||
{data.categories.map((category, categoryIndex) => ( | ||
<SlurCardBubble key={categoryIndex} data={category} /> | ||
))} | ||
</Box> | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default SlurCard; |
19 changes: 19 additions & 0 deletions
19
browser-extension/plugin/src/ui-components/atoms/SlurCardBubble.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Box, Text } from 'grommet'; | ||
|
||
const SlurCardBubble = ({ data }) => { | ||
return( | ||
<Box> | ||
{" "} | ||
<Box | ||
round={"small"} | ||
background="#E7A85F" | ||
pad={"xsmall"} | ||
width={"fit-content"} | ||
> | ||
<Text size={"xsmall"}>{data.category}</Text>{" "} | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
export default SlurCardBubble; |
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