Skip to content

Commit 38c3aaa

Browse files
committed
Fix ying's requests <3
1 parent 37e6d48 commit 38c3aaa

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

frontend/components/Accounts/Forms/ContactInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const ExistingInput = ({
171171
{isVerified && <Indicator src="/greentick.png" />}
172172
<span>{text}</span>
173173
{isPrimary && (
174-
<Tag blue>
174+
<Tag variant="primary">
175175
<span>PRIMARY</span>
176176
</Tag>
177177
)}

frontend/components/Accounts/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,7 @@ const Accounts = ({ user: initialUser }: { user: User }) => {
207207
</FormGroupGrid>
208208
</>
209209
)}
210-
<Button
211-
margin="1.5rem 0 0 0"
212-
style={{ fontSize: "1.2rem" }}
213-
>
210+
<Button marginTop="1.7rem" fontSize="1.2rem">
214211
Save
215212
</Button>
216213
</Form>

frontend/components/Accounts/ui.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,20 @@ export const Indicator = styled.img<{ paddingTop?: string; width?: string }>`
137137
}
138138
`;
139139

140-
export const Tag = styled.div<{ blue?: boolean }>`
140+
const TagVariants = {
141+
default: { col: "#767676", bg: "#e7e7e7" },
142+
primary: { col: "#455f7a", bg: "#adcced" },
143+
};
144+
145+
export const Tag = styled.div<{ variant?: keyof typeof TagVariants }>`
141146
height: 1rem;
142147
margin-top: 0.35rem;
143-
${({ blue }) => `background-color: ${blue ? "#adcced" : "#e7e7e7"};`}
144-
${({ blue }) => `color: ${blue ? "#455f7a" : "#767676"};`}
148+
background-color: ${({ variant = "default" }) => TagVariants[variant].bg};
149+
color: ${({ variant = "default" }) => TagVariants[variant].col};
145150
display: flex;
146151
align-items: center;
147152
justify-content: center;
148153
border-radius: 0.1rem;
149-
${({ blue }) =>
150-
blue ? "" : "box-shadow: 0 0.05rem 0.05rem rgba(0, 0, 0, 0.25);"}
151154
152155
& > * {
153156
margin: 0.2rem;
@@ -169,16 +172,20 @@ export const AddButton = styled.button<{ marginTop?: string }>`
169172

170173
export const Button = styled.button<{
171174
margin?: string;
172-
cancel?: boolean;
175+
backgroundColor?: string;
176+
marginTop?: string;
177+
fontSize?: string;
173178
}>`
174-
background-color: ${(props) => (props.cancel ? "#93a0ad" : "#209cee")};
179+
background-color: ${(props) => props.backgroundColor || "#209cee"};
175180
color: #ffffff;
176181
border: none;
177182
border-radius: 0.2rem;
178183
cursor: pointer;
184+
font-size: ${(props) => props.fontSize};
179185
font-weight: 600;
180186
padding: 0.5rem 0.7rem 0.5rem 0.7rem;
181187
margin: ${(props) => props.margin};
188+
margin-top: ${(props) => props.marginTop};
182189
`;
183190

184191
export const selectStyles = {

0 commit comments

Comments
 (0)