17782: Fixes absolute import paths from '~/somedir/...' to 'somedir/...'
[arvados-workbench2.git] / src / views-components / resource-properties-form / property-chip.tsx
index c51a8d8e0cfb5cfc3d736aa8435c21b9d75e96d4..576ed5a5b3f3448aee1cd1a1569d286f49f89eca 100644 (file)
@@ -5,12 +5,12 @@
 import * as React from 'react';
 import { Chip } from '@material-ui/core';
 import { connect } from 'react-redux';
-import { RootState } from '~/store/store';
+import { RootState } from 'store/store';
 import * as CopyToClipboard from 'react-copy-to-clipboard';
-import { getVocabulary } from '~/store/vocabulary/vocabulary-selectors';
+import { getVocabulary } from 'store/vocabulary/vocabulary-selectors';
 import { Dispatch } from 'redux';
-import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
-import { getTagValueLabel, getTagKeyLabel, Vocabulary } from '~/models/vocabulary';
+import { snackbarActions, SnackbarKind } from 'store/snackbar/snackbar-actions';
+import { getTagValueLabel, getTagKeyLabel, Vocabulary } from 'models/vocabulary';
 
 interface PropertyChipComponentDataProps {
     propKey: string;
@@ -50,3 +50,9 @@ export const PropertyChipComponent = connect(mapStateToProps, mapDispatchToProps
         );
     }
 );
+
+export const getPropertyChip = (k: string, v: string, handleDelete: any, className: string) =>
+    <PropertyChipComponent
+        key={`${k}-${v}`} className={className}
+        onDelete={handleDelete}
+        propKey={k} propValue={v} />;