Warning Header (Closes #205) #394
|
@ -7,5 +7,5 @@
|
|||
opacity: 1;
|
||||
|
||||
max-height: 500px; /* just for smooth fade in purposes */
|
||||
transition: max-height 100ms ease-in;
|
||||
transition: max-height 1000ms ease-in, padding 100ms ease-in;
|
||||
}
|
|
@ -25,7 +25,7 @@ export function WarningHeader() {
|
|||
return (
|
||||
<div
|
||||
className={styles.warning}
|
||||
style={{ maxHeight: 0, opacity: 0 }}
|
||||
style={{ maxHeight: 0, opacity: 0, padding: 0 }}
|
||||
snedadah marked this conversation as resolved
|
||||
></div>
|
||||
snedadah marked this conversation as resolved
Outdated
a3thakra
commented
instead of setting the
instead of setting the `currentWarning`, you should use a declarative approach:
```ts
const currentWarnings = warnings.filter(warning => ...do the thing to filter by date...);
```
|
||||
);
|
||||
}
|
||||
snedadah marked this conversation as resolved
Outdated
a3thakra
commented
I would recommend throwing instead of logging the error. Just logging the error makes us deal with things that aren't defined. If we throw, we don't have to deal with undefined behavior. I would recommend throwing instead of logging the error. Just logging the error makes us deal with things that aren't defined. If we throw, we don't have to deal with undefined behavior.
|
||||
|
|
Loading…
Reference in New Issue
Do we really need this comment here? I personally think the comment on line 25, along with the general structure of the code, are already sufficient to convey what is happening and why.