chore: style updates

This commit is contained in:
Anoop M D 2023-10-04 04:11:23 +05:30
parent e4ea6b9109
commit 9b2e2ed3d8
8 changed files with 23 additions and 18 deletions

View File

@ -6,6 +6,10 @@ const Wrapper = styled.div`
.auth-mode-selector { .auth-mode-selector {
background: transparent; background: transparent;
.auth-mode-label {
color: ${(props) => props.theme.colors.text.yellow};
}
.dropdown-item { .dropdown-item {
padding: 0.2rem 0.6rem !important; padding: 0.2rem 0.6rem !important;
} }

View File

@ -15,7 +15,7 @@ const AuthMode = ({ item, collection }) => {
const Icon = forwardRef((props, ref) => { const Icon = forwardRef((props, ref) => {
return ( return (
<div ref={ref} className="flex items-center justify-center text-yellow-600 select-none"> <div ref={ref} className="flex items-center justify-center auth-mode-label select-none">
{humanizeRequestAuthMode(authMode)} <IconCaretDown className="caret ml-1 mr-1" size={14} strokeWidth={2} /> {humanizeRequestAuthMode(authMode)} <IconCaretDown className="caret ml-1 mr-1" size={14} strokeWidth={2} />
</div> </div>
); );

View File

@ -7,7 +7,8 @@ const Wrapper = styled.div`
.single-line-editor-wrapper { .single-line-editor-wrapper {
padding: 0.15rem 0.4rem; padding: 0.15rem 0.4rem;
border: ${(props) => props.theme.input.border}; border-radius: 3px;
border: solid 1px ${(props) => props.theme.input.border};
background-color: ${(props) => props.theme.input.bg}; background-color: ${(props) => props.theme.input.bg};
} }
`; `;

View File

@ -7,7 +7,8 @@ const Wrapper = styled.div`
.single-line-editor-wrapper { .single-line-editor-wrapper {
padding: 0.15rem 0.4rem; padding: 0.15rem 0.4rem;
border: ${(props) => props.theme.input.border}; border-radius: 3px;
border: solid 1px ${(props) => props.theme.input.border};
background-color: ${(props) => props.theme.input.bg}; background-color: ${(props) => props.theme.input.bg};
} }
`; `;

View File

@ -17,6 +17,12 @@ const StyledWrapper = styled.div`
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
div[role='tablist'] {
.active {
color: ${(props) => props.theme.colors.text.yellow};
}
}
`; `;
export default StyledWrapper; export default StyledWrapper;

View File

@ -13,7 +13,7 @@ import { useMemo } from 'react';
const QueryResult = ({ item, collection, data, width, disableRunEventListener, headers }) => { const QueryResult = ({ item, collection, data, width, disableRunEventListener, headers }) => {
const { storedTheme } = useTheme(); const { storedTheme } = useTheme();
const [tab, setTab] = useState('raw'); const [tab, setTab] = useState('preview');
const dispatch = useDispatch(); const dispatch = useDispatch();
const contentType = getContentType(headers); const contentType = getContentType(headers);
const mode = getCodeMirrorModeBasedOnContentType(contentType); const mode = getCodeMirrorModeBasedOnContentType(contentType);
@ -64,8 +64,8 @@ const QueryResult = ({ item, collection, data, width, disableRunEventListener, h
const getTabClassname = (tabName) => { const getTabClassname = (tabName) => {
return classnames(`select-none ${tabName}`, { return classnames(`select-none ${tabName}`, {
'text-yellow-500': tabName === tab, active: tabName === tab,
'cursor-pointer': tabName !== tab, 'cursor-pointer': tabName !== tab
}); });
}; };
@ -99,16 +99,7 @@ const QueryResult = ({ item, collection, data, width, disableRunEventListener, h
); );
} }
return ( return <CodeEditor collection={collection} theme={storedTheme} onRun={onRun} value={value} mode={mode} readOnly />;
<CodeEditor
collection={collection}
theme={storedTheme}
onRun={onRun}
value={value}
mode={mode}
readOnly
/>
);
}, [tab, collection, storedTheme, onRun, value, mode]); }, [tab, collection, storedTheme, onRun, value, mode]);
return ( return (

View File

@ -9,7 +9,8 @@ const darkTheme = {
green: 'rgb(11 178 126)', green: 'rgb(11 178 126)',
danger: '#f06f57', danger: '#f06f57',
muted: '#9d9d9d', muted: '#9d9d9d',
purple: '#cd56d6' purple: '#cd56d6',
yellow: '#f59e0b'
}, },
bg: { bg: {
danger: '#d03544' danger: '#d03544'

View File

@ -9,7 +9,8 @@ const lightTheme = {
green: '#047857', green: '#047857',
danger: 'rgb(185, 28, 28)', danger: 'rgb(185, 28, 28)',
muted: '#4b5563', muted: '#4b5563',
purple: '#8e44ad' purple: '#8e44ad',
yellow: '#d97706'
}, },
bg: { bg: {
danger: '#dc3545' danger: '#dc3545'