aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionCardDeckView.tsx
diff options
context:
space:
mode:
authoreleanor-park <eleanor_park@brown.edu>2024-08-27 16:44:12 -0400
committereleanor-park <eleanor_park@brown.edu>2024-08-27 16:44:12 -0400
commit39d2bba7bf4b0cc3759931691640083a48cce662 (patch)
tree8bf110760aa926237b6294aec545f48cfc92747d /src/client/views/collections/CollectionCardDeckView.tsx
parent6f73686ec4dc3e01ae3eacc0150aa59eafea0325 (diff)
parentb8a04a0fedf8ef3612395764a0ecd01f6824ebd1 (diff)
Merge branch 'master' into eleanor-gptdraw
Diffstat (limited to 'src/client/views/collections/CollectionCardDeckView.tsx')
-rw-r--r--src/client/views/collections/CollectionCardDeckView.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx
index de46180e6..28a769896 100644
--- a/src/client/views/collections/CollectionCardDeckView.tsx
+++ b/src/client/views/collections/CollectionCardDeckView.tsx
@@ -18,7 +18,7 @@ import { StyleProp } from '../StyleProp';
import { DocumentView } from '../nodes/DocumentView';
import { GPTPopup, GPTPopupMode } from '../pdf/GPTPopup/GPTPopup';
import './CollectionCardDeckView.scss';
-import { CollectionSubView } from './CollectionSubView';
+import { CollectionSubView, SubCollectionViewProps } from './CollectionSubView';
enum cardSortings {
Time = 'time',
@@ -68,7 +68,7 @@ export class CollectionCardView extends CollectionSubView() {
}
};
- constructor(props: any) {
+ constructor(props: SubCollectionViewProps) {
super(props);
makeObservable(this);
}
@@ -86,11 +86,11 @@ export class CollectionCardView extends CollectionSubView() {
}
@computed get cardSort_customField() {
- return StrCast(this.Document.cardSort_customField) as any as 'chat' | 'star' | 'idea' | 'like';
+ return StrCast(this.Document.cardSort_customField) as 'chat' | 'star' | 'idea' | 'like';
}
@computed get cardSort() {
- return StrCast(this.Document.cardSort) as any as cardSortings;
+ return StrCast(this.Document.cardSort) as cardSortings;
}
/**
* how much to scale down the contents of the view so that everything will fit
@@ -428,7 +428,6 @@ export class CollectionCardView extends CollectionSubView() {
return (
<div className="card-button-container" style={{ width: `${totalWidth}px` }}>
{numberRange(amButtons).map(i => (
- // eslint-disable-next-line jsx-a11y/control-has-associated-label
<button
key={i}
type="button"
@@ -496,8 +495,8 @@ export class CollectionCardView extends CollectionSubView() {
className="collectionCardView-outer"
ref={this.createDashEventsTarget}
style={{
- background: this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.BackgroundColor),
- color: this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.Color),
+ background: this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.BackgroundColor) as string,
+ color: this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.Color) as string,
}}>
<div
className="card-wrapper"