Skip to content

Commit fd59d86

Browse files
committed
update the UI as per the Figma design
1 parent d16ed65 commit fd59d86

6 files changed

Lines changed: 363 additions & 156 deletions

File tree

src/client/components/button.module.css

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
.buttonPrimary {
2-
font-family: 'Commissioner', sans-serif;
3-
font-size: 14px;
4-
line-height: 1.25rem;
2+
font-family: 'Recursive', sans-serif;
3+
font-weight: 600;
4+
font-size: 16px;
5+
line-height: 24px;
6+
letter-spacing: 0%;
57
width: 100%;
68
height: 36px;
79
padding: 6px 16px;
@@ -14,6 +16,7 @@
1416
display: flex;
1517
align-items: center;
1618
justify-content: flex-start;
19+
vertical-align: middle;
1720
}
1821

1922
.buttonPrimary:hover {
@@ -23,16 +26,19 @@
2326
}
2427

2528
.button {
26-
font-family: 'Commissioner', sans-serif;
27-
font-size: 14px;
28-
line-height: 1.25rem;
29+
font-family: 'Recursive', sans-serif;
30+
font-weight: 600;
31+
font-size: 16px;
32+
line-height: 24px;
33+
letter-spacing: 0%;
2934
padding: 0.5rem;
3035
outline: none;
3136
border-radius: 0.375rem;
3237
border: none;
3338
background-color: #E80962;
3439
cursor: pointer;
3540
color: white;
41+
vertical-align: middle;
3642
}
3743

3844
.button:hover {
@@ -55,4 +61,41 @@
5561
border-color: rgb(207, 207, 211);
5662
}
5763

64+
.buttonLogout {
65+
font-family: 'Recursive', sans-serif;
66+
font-weight: 500;
67+
font-size: 14px;
68+
line-height: 24px;
69+
letter-spacing: 0%;
70+
width: 100%;
71+
height: 52px;
72+
padding: 14px;
73+
outline: none;
74+
border-radius: 6px;
75+
border: none;
76+
background-color: transparent;
77+
cursor: pointer;
78+
color: #444746;
79+
display: flex;
80+
align-items: center;
81+
justify-content: flex-start;
82+
gap: 8px;
83+
opacity: 1;
84+
vertical-align: middle;
85+
transition: all 0.2s ease;
86+
}
87+
88+
.buttonLogout:hover {
89+
background-color: rgba(68, 71, 70, 0.1);
90+
color: #1E1A2E;
91+
transition: all 0.2s ease;
92+
}
93+
94+
.buttonLogout:active {
95+
background-color: rgba(68, 71, 70, 0.2);
96+
color: #1E1A2E;
97+
transform: translateY(1px);
98+
transition: all 0.1s ease;
99+
}
100+
58101

src/client/components/button.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface ButtonProps {
88
disabled?: boolean;
99
style?: React.CSSProperties;
1010
loading?: boolean;
11-
variant?: 'primary' | 'secondary';
11+
variant?: 'primary' | 'secondary' | 'logout';
1212
icon?: React.ReactNode;
1313
}
1414

@@ -22,9 +22,15 @@ const Button: FunctionComponent<ButtonProps> = ({
2222
icon,
2323
...rest
2424
}) => {
25+
const getButtonClassName = () => {
26+
if (variant === 'primary') return styles.buttonPrimary;
27+
if (variant === 'logout') return styles.buttonLogout;
28+
return styles.button;
29+
};
30+
2531
return (
2632
<button
27-
className={`${variant === 'primary' ? styles.buttonPrimary : styles.button} ${loading ? styles.buttonLoading : ''} `}
33+
className={`${getButtonClassName()} ${loading ? styles.buttonLoading : ''} `}
2834
style={style}
2935
onClick={onClick}
3036
disabled={disabled}

src/client/create-diagram-dialog/components/create-diagram-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const CreateDiagramDialog = () => {
1717
useEffect(() => {
1818
if (!authState?.authorized) return;
1919
const url = buildUrl(
20-
'/app/diagrams/new?pluginSource=googledocs&shouldShowPopup=true',
20+
'/app/diagrams/new?pluginSource=googledocs',
2121
authState.token
2222
);
2323
setDiagramsUrl(url);

0 commit comments

Comments
 (0)