From d6374ba1b76970f715032af88747d41e1586d68f Mon Sep 17 00:00:00 2001 From: RohitR311 Date: Wed, 8 Jan 2025 20:53:02 +0530 Subject: [PATCH] feat: change styling for buttons --- src/components/organisms/RightSidePanel.tsx | 125 ++++++++------------ 1 file changed, 51 insertions(+), 74 deletions(-) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index 430377d8..908aa600 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -466,30 +466,11 @@ export const RightSidePanel: React.FC = ({ onFinishCapture const theme = useThemeMode(); const isDarkMode = theme.darkMode; return ( - + {/* Last action: {` ${lastAction}`} */} - {/* */} - {/* {!getText && !getScreenshot && !getList && showCaptureList && } */} - {/* */} {!getText && !getScreenshot && !getList && showCaptureList && } @@ -503,10 +484,7 @@ export const RightSidePanel: React.FC = ({ onFinishCapture sx={{ color: '#ff00c3 !important', borderColor: '#ff00c3 !important', - '&:hover': { - borderColor: '#ff00c3 !important', - backgroundColor: 'whitesmoke !important', - } + backgroundColor: 'whitesmoke !important', }} > {t('right_panel.buttons.back')} @@ -519,10 +497,7 @@ export const RightSidePanel: React.FC = ({ onFinishCapture sx={{ color: '#ff00c3 !important', borderColor: '#ff00c3 !important', - '&:hover': { - borderColor: '#ff00c3 !important', - backgroundColor: 'whitesmoke !important', - } + backgroundColor: 'whitesmoke !important', }} > {captureStage === 'initial' ? t('right_panel.buttons.confirm_capture') : @@ -537,11 +512,8 @@ export const RightSidePanel: React.FC = ({ onFinishCapture sx={{ color: 'red !important', borderColor: 'red !important', - '&:hover': { - borderColor: 'red !important', - backgroundColor: 'whitesmoke !important', - } - }} > + backgroundColor: 'whitesmoke !important', + }} > {t('right_panel.buttons.discard')} @@ -554,27 +526,19 @@ export const RightSidePanel: React.FC = ({ onFinishCapture variant={paginationType === 'clickNext' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('clickNext')} sx={{ - color: '#ff00c3 !important', + color: paginationType === 'clickNext' ? 'whitesmoke !important' : '#ff00c3 !important', borderColor: '#ff00c3 !important', - backgroundColor: paginationType === 'clickNext' ? 'whitesmoke !important' : 'transparent !important', - '&:hover': { - borderColor: '#ff00c3 !important', - backgroundColor: 'whitesmoke !important', - } - }}> + backgroundColor: paginationType === 'clickNext' ? '#ff00c3 !important' : 'whitesmoke !important', + }}> {t('right_panel.pagination.click_next')} @@ -582,13 +546,9 @@ export const RightSidePanel: React.FC = ({ onFinishCapture variant={paginationType === 'scrollDown' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('scrollDown')} sx={{ - color: '#ff00c3 !important', + color: paginationType === 'scrollDown' ? 'whitesmoke !important' : '#ff00c3 !important', borderColor: '#ff00c3 !important', - backgroundColor: paginationType === 'scrollDown' ? 'whitesmoke !important' : 'transparent !important', - '&:hover': { - borderColor: '#ff00c3 !important', - backgroundColor: 'whitesmoke !important', - } + backgroundColor: paginationType === 'scrollDown' ? '#ff00c3 !important' : 'whitesmoke !important', }}> {t('right_panel.pagination.scroll_down')} @@ -596,13 +556,9 @@ export const RightSidePanel: React.FC = ({ onFinishCapture variant={paginationType === 'scrollUp' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('scrollUp')} sx={{ - color: '#ff00c3 !important', + color: paginationType === 'scrollUp' ? 'whitesmoke !important' : '#ff00c3 !important', borderColor: '#ff00c3 !important', - backgroundColor: paginationType === 'scrollUp' ? 'whitesmoke !important' : 'transparent !important', - '&:hover': { - borderColor: '#ff00c3 !important', - backgroundColor: 'whitesmoke !important', - } + backgroundColor: paginationType === 'scrollUp' ? '#ff00c3 !important' : 'whitesmoke !important', }}> {t('right_panel.pagination.scroll_up')} @@ -610,23 +566,17 @@ export const RightSidePanel: React.FC = ({ onFinishCapture variant={paginationType === 'none' ? "contained" : "outlined"} onClick={() => handlePaginationSettingSelect('none')} sx={{ - color: '#ff00c3 !important', + color: paginationType === 'none' ? 'whitesmoke !important' : '#ff00c3 !important', borderColor: '#ff00c3 !important', - backgroundColor: paginationType === 'none' ? 'whitesmoke !important' : 'transparent !important', - '&:hover': { - borderColor: '#ff00c3 !important', - backgroundColor: 'whitesmoke !important', - } + backgroundColor: paginationType === 'none' ? '#ff00c3 !important' : 'whitesmoke !important', }}> {t('right_panel.pagination.none')} )} {showLimitOptions && ( - +

{t('right_panel.limit.title')}

- {/* -

{t('right_panel.limit.title')}

*/}
= ({ onFinishCapture {getText && <> - - + + } @@ -695,7 +664,17 @@ export const RightSidePanel: React.FC = ({ onFinishCapture - + )} @@ -771,7 +750,7 @@ export const RightSidePanel: React.FC = ({ onFinishCapture <> {t('right_panel.messages.list_selected')} {Object.entries(step.fields).map(([key, field]) => ( - + = ({ onFinishCapture ) - }} - - + }} />