Skip to content

Commit 53c819b

Browse files
authored
Merge pull request #958 from amitamrutiya/add-border-rad
feat: add common border radius to all buttons
2 parents 5affa1e + a5347a9 commit 53c819b

File tree

5 files changed

+12
-25
lines changed

5 files changed

+12
-25
lines changed

src/custom/CatalogDetail/ActionButton.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
5050
{showOpenPlaygroundAction && (
5151
<ActionButton
5252
sx={{
53-
borderRadius: '0.2rem',
5453
backgroundColor: theme.palette.background.cta?.default,
5554
color: theme.palette.text.inverse,
5655
gap: '10px',
@@ -81,7 +80,6 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
8180
sx={{
8281
backgroundColor: showOpenPlaygroundAction ? 'transparent' : undefined,
8382
color: theme.palette.text.default,
84-
borderRadius: '0.2rem',
8583
gap: '10px',
8684
border: `1px solid ${theme.palette.border.normal}`
8785
}}
@@ -100,7 +98,6 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
10098
)}
10199
<ActionButton
102100
sx={{
103-
borderRadius: '0.2rem',
104101
backgroundColor: 'transparent',
105102
border: `1px solid ${theme.palette.border.normal}`,
106103
gap: '10px',
@@ -129,7 +126,6 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
129126
{showInfoAction && (
130127
<ActionButton
131128
sx={{
132-
borderRadius: '0.2rem',
133129
backgroundColor: 'transparent',
134130
border: `1px solid ${theme.palette.border.normal}`,
135131
gap: '10px',
@@ -144,7 +140,6 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
144140
{showDeleteAction && (
145141
<UnpublishAction
146142
sx={{
147-
borderRadius: '0.2rem',
148143
gap: '10px'
149144
}}
150145
onClick={handleDelete}
@@ -156,7 +151,6 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
156151
{showUnpublishAction && (
157152
<UnpublishAction
158153
sx={{
159-
borderRadius: '0.2rem',
160154
gap: '10px'
161155
}}
162156
onClick={handleUnpublish}

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)