diff --git a/src/components/AnnotationCategoryItem.tsx b/src/components/AnnotationCategoryItem.tsx index acf1cd3a..9807299e 100644 --- a/src/components/AnnotationCategoryItem.tsx +++ b/src/components/AnnotationCategoryItem.tsx @@ -1,14 +1,25 @@ import React from 'react' -import { Menu, Space, Checkbox, Tooltip } from 'antd' +import { Menu, Space, Checkbox, Tooltip, Popover, Button } from 'antd' +import { SettingOutlined } from '@ant-design/icons' import { Category, Type } from './AnnotationCategoryList' +import ColorSettingsMenu from './ColorSettingsMenu' const AnnotationGroupItem = ({ category, onChange, - checkedAnnotationGroupUids + checkedAnnotationGroupUids, + onStyleChange, + defaultAnnotationGroupStyles }: { category: Category onChange: Function + onStyleChange: Function + defaultAnnotationGroupStyles: { + [annotationGroupUID: string]: { + opacity: number + color: number[] + } + } checkedAnnotationGroupUids: Set }): JSX.Element => { const { types } = category @@ -60,6 +71,32 @@ const AnnotationGroupItem = ({ > {category.CodeMeaning} + ( + { + return [...acc, ...type.uids] + }, + [] + )} + onStyleChange={onStyleChange} + defaultStyle={ + defaultAnnotationGroupStyles[types[0].uids[0]] + } + /> + )} + > +