Skip to content

Commit e3d47fc

Browse files
authored
fix(crud): fix json editor hanging out over the rounded corners (#3924)
fix json editor hanging out over the rounded corners
1 parent bf764b5 commit e3d47fc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/compass-crud/src/components/document-json-view.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { cx, KeylineCard } from '@mongodb-js/compass-components';
3+
import { css, cx, KeylineCard } from '@mongodb-js/compass-components';
44

55
import type { JsonEditorProps } from './json-editor';
66
import JsonEditor from './json-editor';
@@ -36,6 +36,10 @@ export type DocumentJsonViewProps = {
3636
| 'isExpanded'
3737
>;
3838

39+
const keylineCardCSS = css({
40+
overflow: 'hidden',
41+
});
42+
3943
/**
4044
* Represents the list view of the documents tab.
4145
*/
@@ -51,7 +55,7 @@ class DocumentJsonView extends React.Component<DocumentJsonViewProps> {
5155
return this.props.docs.map((doc, i) => {
5256
return (
5357
<li className={LIST_ITEM_CLASS} data-testid={LIST_ITEM_TEST_ID} key={i}>
54-
<KeylineCard>
58+
<KeylineCard className={keylineCardCSS}>
5559
<JsonEditor
5660
key={doc.uuid}
5761
doc={doc}

0 commit comments

Comments
 (0)