Skip to content

Commit 3f6c8bd

Browse files
Matthew ChanaMatthew Chana
authored andcommitted
add color for dark primary
1 parent 91db77b commit 3f6c8bd

File tree

3 files changed

+4
-43
lines changed

3 files changed

+4
-43
lines changed

src/components/Arguments/index.tsx

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -273,32 +273,7 @@ const removeNotification2 = (set: any, id: number) => {
273273
})
274274
}
275275
},[project])
276-
277276

278-
const storageAcctKeys = Object.keys(storageMap)
279-
280-
// create state for account signers and accounts who's sstorage is updated after a tx
281-
const [lastUpdatedAccts, setLastUpdatedAccts] = useState< string[] | null >(null)
282-
const [lastTxSignerAccts, setLastTxSignerAccts] = useState< string[] | null >(null)
283-
useEffect(() => {
284-
if (updatedStorageAccts && lastTxSigners) {
285-
286-
let storageAccts: string[] = []
287-
updatedStorageAccts?.map((acctIdx) => storageAccts.push(storageAcctKeys[acctIdx]))
288-
setLastUpdatedAccts(storageAccts)
289-
290-
let txSignerAccts: string[] = []
291-
lastTxSigners?.map((acct: any) => {
292-
const addr = acct.address
293-
const acctNum = addr.charAt(addr.length-1)
294-
const acctHex = `0x0${acctNum}`
295-
txSignerAccts.push(acctHex)
296-
})
297-
setLastTxSignerAccts(txSignerAccts)
298-
299-
}
300-
},[updatedStorageAccts, lastTxSigners])
301-
302277

303278
const { accounts } = project;
304279

@@ -472,7 +447,7 @@ const removeNotification2 = (set: any, id: number) => {
472447
</HoverPanel>
473448
</motion.div>
474449

475-
<ToastContainer lastTxHadErrors={false}>
450+
<ToastContainer>
476451
<ul>
477452
<AnimatePresence initial={true}>
478453
{Object.keys(notifications2).map((id) => {

src/components/Arguments/styles.tsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -129,30 +129,15 @@ export const ControlContainer = styled.div<ControlContainerProps>`
129129
}};
130130
`;
131131

132-
interface ToastContainerProps {
133-
lastTxHadErrors: boolean;
134-
}
135-
136-
export const ToastContainer = styled.div<ToastContainerProps>`
132+
export const ToastContainer = styled.div`
137133
z-index: 1000;
138134
position: fixed;
139135
bottom: 40px;
140136
left: 80px;
141137
display: flex;
142138
align-items: center;
143139
justify-content: space-between;
144-
color: ${({ lastTxHadErrors }) => {
145-
switch (lastTxHadErrors) {
146-
case true:
147-
return '#f44336';
148-
case false:
149-
return '#2bb169';
150-
default:
151-
return '#EE431E';
152-
}
153-
}};
154-
155-
140+
color: ${theme.colors.darkPrimary};
156141
`;
157142

158143
export const StatusMessage = styled.div`

src/theme.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export default {
22
colors: {
33
primary: "#00ff76",
4+
darkPrimary: "#2bb169",
45
background: "#fff",
56
text: "#222",
67
muted: "#6a6a6a",

0 commit comments

Comments
 (0)