(this.child = el)} onClick={this.handleClick}>
+
(this.child = el)}
+ onClick={this.selectElement}
+ onFocus={this.selectElement}
+ tabIndex={0}
+ >
{children}
);
diff --git a/src/components/__tests__/JsonViewer.tsx b/src/components/__tests__/JsonViewer.tsx
index 8f8f745ee7..8649c14d3f 100644
--- a/src/components/__tests__/JsonViewer.tsx
+++ b/src/components/__tests__/JsonViewer.tsx
@@ -25,11 +25,11 @@ describe('Components', () => {
test('should collapse/uncollapse', () => {
expect(component.html()).not.toContain('class="hoverable"'); // all are collapsed by default
- const expandAll = component.find('div > span[children=" Expand all "]');
+ const expandAll = component.find('div > button[children=" Expand all "]');
expandAll.simulate('click');
expect(component.html()).toContain('class="hoverable"'); // all are collapsed
- const collapseAll = component.find('div > span[children=" Collapse all "]');
+ const collapseAll = component.find('div > button[children=" Collapse all "]');
collapseAll.simulate('click');
expect(component.html()).not.toContain('class="hoverable"'); // all are collapsed
});
@@ -37,7 +37,7 @@ describe('Components', () => {
test('should collapse/uncollapse', () => {
ClipboardService.copySelected = jest.fn();
- const copy = component.find('span[onClick]').first();
+ const copy = component.find('button[onClick]').first();
copy.simulate('click');
expect(ClipboardService.copySelected as jest.Mock).toHaveBeenCalled();
diff --git a/src/theme.ts b/src/theme.ts
index f6554cb051..6679f9d521 100644
--- a/src/theme.ts
+++ b/src/theme.ts
@@ -20,7 +20,7 @@ const defaultTheme: ThemeInterface = {
contrastText: ({ colors }) => readableColor(colors.primary.main),
},
success: {
- main: '#37d247',
+ main: '#1d8127',
light: ({ colors }) => lighten(colors.tonalOffset * 2, colors.success.main),
dark: ({ colors }) => darken(colors.tonalOffset, colors.success.main),
contrastText: ({ colors }) => readableColor(colors.success.main),
@@ -32,7 +32,7 @@ const defaultTheme: ThemeInterface = {
contrastText: '#ffffff',
},
error: {
- main: '#e53935',
+ main: '#d41f1c',
light: ({ colors }) => lighten(colors.tonalOffset, colors.error.main),
dark: ({ colors }) => darken(colors.tonalOffset, colors.error.main),
contrastText: ({ colors }) => readableColor(colors.error.main),
@@ -52,11 +52,11 @@ const defaultTheme: ThemeInterface = {
responses: {
success: {
color: ({ colors }) => colors.success.main,
- backgroundColor: ({ colors }) => transparentize(0.9, colors.success.main),
+ backgroundColor: ({ colors }) => transparentize(0.93, colors.success.main),
},
error: {
color: ({ colors }) => colors.error.main,
- backgroundColor: ({ colors }) => transparentize(0.9, colors.error.main),
+ backgroundColor: ({ colors }) => transparentize(0.93, colors.error.main),
},
redirect: {
color: ({ colors }) => colors.warning.main,
diff --git a/tsconfig.lib.json b/tsconfig.lib.json
index eb81bb904e..f67f175771 100644
--- a/tsconfig.lib.json
+++ b/tsconfig.lib.json
@@ -1,10 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
- "declarationDir": "typings"
+ "declarationDir": "typings",
+ "skipLibCheck": true,
},
"include": [
"./custom.d.ts",
"src/index.ts"
]
-}
\ No newline at end of file
+}