Skip to content

Commit 92a1131

Browse files
jyash97CompuIves
authored andcommitted
fix(theme): theme fixes in secondary button & devtools (codesandbox#3004)
1 parent daeab6f commit 92a1131

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

packages/app/src/app/components/Preview/DevTools/Console/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ class ConsoleComponent extends React.Component<StyledProps> {
180180
method: 'log',
181181
data: [
182182
'%cConsole was cleared',
183-
'font-style: italic; color: rgba(255, 255, 255, 0.3)',
183+
`font-style: italic; color: ${
184+
this.props.theme.vscodeTheme.type === 'light'
185+
? 'rgba(0, 0, 0, 0.3)'
186+
: 'rgba(255, 255, 255, 0.3)'
187+
}`,
184188
],
185189
},
186190
];

packages/app/src/app/components/Preview/DevTools/Tabs/Tab/UnreadDevToolsCount.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ const Container = styled.div<{ unread: number; status: StatusType }>`
1414
height: 16px;
1515
width: 16px;
1616
color: ${({ unread }) =>
17-
unread === 0 ? `rgba(255, 255, 255, 0.4)` : 'white'};
17+
unread === 0 ? 'rgba(255, 255, 255, 0.4)' : 'white'};
1818
background-color: ${({ status, unread, theme }) => {
1919
if (unread === 0) {
20-
return 'rgba(255, 255, 255, 0.2)';
20+
return theme.vscodeTheme.type === 'dark'
21+
? 'rgba(255, 255, 255, 0.2)'
22+
: 'rgba(0, 0, 0, 0.2)';
2123
}
2224
if (status === 'info') {
2325
return theme.secondary();

packages/common/src/components/Button/elements.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ const getBackgroundHoverColor = ({
4747
: theme.background2.darken(0.3)()
4848
}`;
4949
if (danger) return `background-color: #E25D6A`;
50-
if (secondary) return `background-color: #66b9f4`;
5150
if (red) return `background-color: #F27777`;
5251
if (internalTheme && internalTheme['button.hoverBackground']) {
5352
return `background-color: ${internalTheme['button.hoverBackground']}`;
5453
}
54+
if (secondary) return `background-color: #66b9f4`;
5555

5656
return `background-color: #66b9f4;`;
5757
};
@@ -88,12 +88,12 @@ const getBorder = ({
8888
return internalTheme.light
8989
? '2px solid rgba(0, 0, 0, 0.3)'
9090
: '2px solid #161A1C';
91-
if (secondary) return `2px solid #66B9F4`;
9291
if (red) return '2px solid #F27777';
9392
if (danger) return '2px solid #E25D6A';
9493
if (internalTheme && internalTheme['button.hoverBackground']) {
9594
return `2px solid ${internalTheme['button.hoverBackground']}`;
9695
}
96+
if (secondary) return `2px solid #66B9F4`;
9797

9898
return '2px solid #66B9F4';
9999
};

0 commit comments

Comments
 (0)