diff --git a/browser-extension/plugin/src/ui-components/atoms/SlurCardComponent.js b/browser-extension/plugin/src/ui-components/atoms/SlurCardComponent.js new file mode 100644 index 00000000..f5ee618a --- /dev/null +++ b/browser-extension/plugin/src/ui-components/atoms/SlurCardComponent.js @@ -0,0 +1,21 @@ +import React from 'react' +import SlurCardBubble from './SlurCardBubble'; +import { + Card, CardBody, CardFooter, CardHeader, List, + Text, + Box, + Button, + Anchor, +} from 'grommet'; + + +const SlurCardComponent = ({ data }) => { + return ( + + Header + Body + + ) +} + +export default SlurCardComponent \ No newline at end of file diff --git a/browser-extension/plugin/src/ui-components/pages/Slur.jsx b/browser-extension/plugin/src/ui-components/pages/Slur.jsx index c850cb81..0a334cd7 100644 --- a/browser-extension/plugin/src/ui-components/pages/Slur.jsx +++ b/browser-extension/plugin/src/ui-components/pages/Slur.jsx @@ -5,6 +5,7 @@ import { useNavigate } from 'react-router-dom'; import Api from './Api'; import { UserContext, NotificationContext } from '../atoms/AppContext'; import SlurCard from '../atoms/SlurCard'; +import SlurCardComponent from '../atoms/SlurCardComponent'; const { getSlurAndCategory, deleteSlurAndCategory } = Api; @@ -102,6 +103,9 @@ export function Slur() { {getSlurs.map((slur, index) => ( + // + // + // { - const casualValue = value ? 'Yes' : 'No'; - setFormData({ ...formData, casual: casualValue }); - }; return ( - - Go Back + + {/* Go Back */} Add Slur +
{ @@ -153,7 +151,7 @@ export function SlurCreate() { /> - {/* + - handleCasualChange(event.target.value) - } - /> - */} - - - - setFormData({ - ...formData, - casual: e.target.value === 'Yes' - }) - } /> - + - setFormData({ - ...formData, - appropriated: e.target.value === 'Yes' - }) - } + options={[ + { label: 'Yes', value: true }, + { label: 'No', value: false } + ]} + value={formData.appropriated} /> - setFormData({ - ...formData, - appropriationContext: - e.target.value === 'Community' - }) - } + options={[ + { label: 'Community', value: true }, + { label: 'Others', value: false } + ]} + value={formData.appropriationContext} />