File tree Expand file tree Collapse file tree 2 files changed +28
-18
lines changed
packages/compass-data-modeling/src/components Expand file tree Collapse file tree 2 files changed +28
-18
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ const ExportDiagramModal = ({
8888 size = "small"
8989 description = "Importable into Compass and Data Explorer so teammates can collaborate."
9090 >
91- Diagram File
91+ MDM File
9292 </ Radio >
9393 </ div >
9494 < div className = { radioItemStyles } >
Original file line number Diff line number Diff line change 33 Button ,
44 type ButtonProps ,
55 FileSelector ,
6+ Tooltip ,
67} from '@mongodb-js/compass-components' ;
78
89type ImportDiagramButtonProps = Omit < ButtonProps , 'onClick' > & {
@@ -14,22 +15,31 @@ export const ImportDiagramButton = ({
1415 ...buttonProps
1516} : ImportDiagramButtonProps ) => {
1617 return (
17- < FileSelector
18- id = "import-diagram-file-input"
19- data-testid = "import-diagram-file-input"
20- multiple = { false }
21- accept = ".mdm"
22- onSelect = { ( files ) => {
23- if ( files . length === 0 ) {
24- return ;
25- }
26- onImportDiagram ( files [ 0 ] ) ;
27- } }
28- trigger = { ( { onClick } ) => (
29- < Button { ...buttonProps } onClick = { onClick } >
30- Import diagram
31- </ Button >
32- ) }
33- />
18+ < Tooltip
19+ trigger = {
20+ < span >
21+ < FileSelector
22+ id = "import-diagram-file-input"
23+ data-testid = "import-diagram-file-input"
24+ multiple = { false }
25+ accept = ".mdm"
26+ onSelect = { ( files ) => {
27+ if ( files . length === 0 ) {
28+ return ;
29+ }
30+ onImportDiagram ( files [ 0 ] ) ;
31+ } }
32+ trigger = { ( { onClick } ) => (
33+ < Button { ...buttonProps } onClick = { onClick } >
34+ Import diagram
35+ </ Button >
36+ ) }
37+ />
38+ </ span >
39+ }
40+ >
41+ Only MDM files exported from Compass or Atlas Data Explorer can be
42+ imported.
43+ </ Tooltip >
3444 ) ;
3545} ;
You can’t perform that action at this time.
0 commit comments