Skip to content

Commit 4040207

Browse files
committed
feat: add common border radiius to all buttons
Signed-off-by: amitamrutiya <amitamrutiya2210@gmail.com>
1 parent 9b212ae commit 4040207

5 files changed

Lines changed: 17 additions & 24 deletions

File tree

src/custom/CatalogDetail/ActionButton.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
5050
{showOpenPlaygroundAction && (
5151
<ActionButton
5252
sx={{
53-
borderRadius: '0.2rem',
53+
borderRadius: theme.shape.borderRadius,
5454
backgroundColor: theme.palette.background.cta?.default,
5555
color: theme.palette.text.inverse,
5656
gap: '10px',
@@ -81,7 +81,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
8181
sx={{
8282
backgroundColor: showOpenPlaygroundAction ? 'transparent' : undefined,
8383
color: theme.palette.text.default,
84-
borderRadius: '0.2rem',
84+
borderRadius: theme.shape.borderRadius,
8585
gap: '10px',
8686
border: `1px solid ${theme.palette.border.normal}`
8787
}}
@@ -100,7 +100,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
100100
)}
101101
<ActionButton
102102
sx={{
103-
borderRadius: '0.2rem',
103+
borderRadius: theme.shape.borderRadius,
104104
backgroundColor: 'transparent',
105105
border: `1px solid ${theme.palette.border.normal}`,
106106
gap: '10px',
@@ -129,7 +129,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
129129
{showInfoAction && (
130130
<ActionButton
131131
sx={{
132-
borderRadius: '0.2rem',
132+
borderRadius: theme.shape.borderRadius,
133133
backgroundColor: 'transparent',
134134
border: `1px solid ${theme.palette.border.normal}`,
135135
gap: '10px',
@@ -144,7 +144,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
144144
{showDeleteAction && (
145145
<UnpublishAction
146146
sx={{
147-
borderRadius: '0.2rem',
147+
borderRadius: theme.shape.borderRadius,
148148
gap: '10px'
149149
}}
150150
onClick={handleDelete}

src/custom/DashboardWidgets/GettingStartedWidget/ActionButtonCard.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,13 @@ const ActionButtonCard = ({
194194
<CustomComponentWrapper>{customComponent}</CustomComponentWrapper>
195195
{actionButton && (
196196
<CardActions>
197-
<Button disabled={disabled} variant="contained" href={href} onClick={onClick}>
197+
<Button
198+
disabled={disabled}
199+
variant="contained"
200+
href={href}
201+
onClick={onClick}
202+
size="small"
203+
>
198204
{showProgress ? (percentage === 100 ? 'Revisit' : btnTitle) : btnTitle}
199205
</Button>
200206
</CardActions>

src/custom/Workspaces/styles.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Box, Button, Card, Checkbox, Grid, IconButton, Typography } from '../../base';
22
import { DeleteIcon, EditIcon } from '../../icons';
33
import { styled, useTheme } from '../../theme';
4-
import { charcoal } from '../../theme/colors/colors';
54
import { CustomTooltip } from '../CustomTooltip';
65

76
export const ModalActionDiv = styled('div')({
@@ -181,7 +180,6 @@ export const AllocationWorkspace = styled(AllocationButton)({
181180

182181
export const PopupButton = styled(Button)(({ theme }) => ({
183182
width: '100%',
184-
borderRadius: '4px',
185183
background: theme.palette.background.brand?.default,
186184
boxShadow: '0px 4px 4px 0px rgba(0, 0, 0, 0.25)',
187185
display: 'flex',
@@ -215,21 +213,6 @@ export const TabCount = styled('p')<TabStyleProps>(({ theme, textColor }) => ({
215213
color: textColor || theme.palette.text.constant?.white
216214
}));
217215

218-
export const ViewButton = styled(Button)(({ theme }) => ({
219-
width: '100%',
220-
borderRadius: '4px',
221-
background: theme.palette.text.default,
222-
boxShadow: '0px 4px 4px 0px rgba(0, 0, 0, 0.25)',
223-
display: 'flex',
224-
flexDirection: 'column',
225-
marginBottom: '10px',
226-
color: `${charcoal[40]}30 !important`,
227-
'&:hover': {
228-
background: theme.palette.text.default
229-
},
230-
padding: '15px 10px'
231-
}));
232-
233216
interface IconWrapperProps {
234217
disabled?: boolean;
235218
}

src/theme/components/button.modifier.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const MuiButton: Components<Theme>['MuiButton'] = {
1313
} = theme;
1414
return {
1515
...textB2SemiBold,
16+
borderRadius: '0.5rem',
1617
fontWeight: 500,
1718
'&.MuiButton-contained': {
1819
color: constant?.white,

src/theme/theme.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ export const createCustomTheme = (mode: PaletteMode, brandPalette?: Interactiven
2626
},
2727
components,
2828
typography: typography(mode),
29-
breakpoints: {}
29+
breakpoints: {},
30+
shape: {
31+
borderRadius: 8
32+
}
3033
});
3134
};

0 commit comments

Comments
 (0)