Skip to content

Commit f507906

Browse files
samhere06mohas22
andauthored
wss quick create component updated (#501)
* wss quick create component updated --------- Co-authored-by: mohas22 <[email protected]>
1 parent cc0f28b commit f507906

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

packages/react-sdk-components/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.css

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
11
.quick-link-ul-list {
22
list-style: none;
33
padding: 0;
4-
grid-template-columns: repeat(auto-fill, minmax(min(40ch, 100%), 1fr));
4+
grid-template-columns: repeat(auto-fit, minmax(min(20ch, 100%), 1fr));
55
display: grid;
66
gap: calc(1rem);
77
}
88

9-
.quick-link-list {
10-
background-color: var(--link-button-color);
11-
color: var(--app-text-color);
12-
border-radius: 8px;
13-
}
14-
159
.quick-link-button {
1610
text-transform: capitalize !important;
1711
font-size: 16px !important;
1812
color: var(--app-text-color) !important;
19-
padding: calc(0.5rem * 2) !important;
20-
height: 6rem;
13+
height: 10rem;
2114
width: 100%;
22-
justify-content: start !important;
2315
}
2416

2517
.quick-link-icon {
26-
width: 1em;
27-
height: 1em;
2818
flex-shrink: 0;
29-
filter: var(--svg-color);
19+
object-fit: contain;
20+
width: 3rem;
21+
height: 3rem;
3022
}
3123

3224
.quick-link-button-span {
3325
display: flex;
26+
flex-direction: column;
3427
align-items: center;
3528
gap: 0.5rem;
3629
}

packages/react-sdk-components/src/components/designSystemExtension/WssQuickCreate/WssQuickCreate.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Button } from '@mui/material';
2+
import { makeStyles } from '@mui/styles';
23
import './WssQuickCreate.css';
34

45
// WssQuickCreate is one of the few components that does NOT have getPConnect.
@@ -9,8 +10,18 @@ interface WssQuickCreateProps {
910
actions?: any[];
1011
}
1112

13+
const useStyles = makeStyles(theme => ({
14+
quickLinkList: {
15+
backgroundColor: theme.palette.mode === 'dark' ? 'var(--app-background-color)' : 'var(--link-button-color)',
16+
color: 'var(--app-text-color)',
17+
borderRadius: '16px',
18+
border: '1px solid var(--app-primary-color)'
19+
}
20+
}));
21+
1222
export default function WssQuickCreate(props: WssQuickCreateProps) {
1323
const { heading, actions } = props;
24+
const classes = useStyles();
1425

1526
return (
1627
<div>
@@ -21,7 +32,7 @@ export default function WssQuickCreate(props: WssQuickCreateProps) {
2132
{actions &&
2233
actions.map(element => {
2334
return (
24-
<li className='quick-link-list' key={element.label}>
35+
<li className={classes.quickLinkList} key={element.label}>
2536
<Button className='quick-link-button' onClick={element.onClick}>
2637
<span className='quick-link-button-span'>
2738
{element.icon && <img className='quick-link-icon' src={element.icon} />}

0 commit comments

Comments
 (0)