Skip to content

Commit 698a9a1

Browse files
committed
feat: button responsiveness and version mismatch
Signed-off-by: TheFaheem <faheemmushtaq89@gmail.com>
1 parent 4f64ab6 commit 698a9a1

3 files changed

Lines changed: 19 additions & 21 deletions

File tree

src/custom/CustomCatalog/CustomCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ const CustomCatalogCard: React.FC<CatalogCardProps> = ({
280280
</DesignDetailsDiv>
281281

282282
{isDetailed && (
283-
<DesignDetailsDiv style={{ marginTop: '40px' }}>
283+
<DesignDetailsDiv style={{ marginTop: '20px' }}>
284284
<Grid container style={{ justifyContent: 'space-between', alignItems: 'center' }}>
285285
<Grid
286286
item

src/custom/CustomCatalog/Helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const handleImage = async ({
6161
export const DEFAULT_DESIGN_VERSION = '0.0.0';
6262

6363
export const getVersion = (design: Pattern) => {
64-
if (design.visibility === 'published') {
64+
if (design.visibility === 'public') {
6565
return design?.catalog_data?.published_version || DEFAULT_DESIGN_VERSION;
6666
}
6767
try {

src/custom/VisibilityChipMenu/VisibilityChipMenu.tsx

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,25 +49,23 @@ const StyledButton = styled(Button)(() => ({
4949
padding: '0px'
5050
}));
5151

52-
const StyledDiv = styled('div')(
53-
({ theme, enabled, type }: { theme: Theme; enabled: boolean; type: VIEW_VISIBILITY }) => ({
54-
paddingLeft: '0.3rem',
55-
height: '1.5rem',
56-
paddingRight: enabled ? '0' : '0.3rem',
57-
borderRadius: '0.25rem',
58-
border: `1px solid ${NOT_FOUND}`,
59-
background:
60-
theme?.palette.mode === 'light' ? ALICE_BLUE : theme?.palette.background.constant?.table,
61-
textTransform: 'uppercase',
62-
color: theme?.palette.text.default,
63-
display: 'flex',
64-
justifyContent: 'center',
65-
alignItems: 'center',
66-
width: type !== 'published' ? '3.8rem' : 'auto',
67-
fontSize: '0.75rem',
68-
fontFamily: theme?.typography.fontFamily
69-
})
70-
);
52+
const StyledDiv = styled('div')(({ theme, enabled }: { theme: Theme; enabled: boolean }) => ({
53+
paddingLeft: '0.3rem',
54+
height: '1.5rem',
55+
width: 'auto',
56+
paddingRight: enabled ? '0' : '0.3rem',
57+
borderRadius: '0.25rem',
58+
border: `1px solid ${NOT_FOUND}`,
59+
background:
60+
theme?.palette.mode === 'light' ? ALICE_BLUE : theme?.palette.background.constant?.table,
61+
textTransform: 'uppercase',
62+
color: theme?.palette.text.default,
63+
display: 'flex',
64+
justifyContent: 'center',
65+
alignItems: 'center',
66+
fontSize: '0.75rem',
67+
fontFamily: theme?.typography.fontFamily
68+
}));
7169

7270
const StyledMenuItem = styled(MenuItem)(({ theme }) => ({
7371
textTransform: 'capitalize',

0 commit comments

Comments
 (0)