Skip to content

Commit 45d6ad8

Browse files
Minor adjustments
1 parent 4d15a22 commit 45d6ad8

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/__tests__/components/TokenChip.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ const WORD_TOKEN = {
7070
*
7171
* @returns An object with all required props set to no-op stubs.
7272
*/
73-
function requiredProps() {
73+
function requiredProps(): { token: Token & { type: 'word' }; onFocus: () => void } {
7474
return {
7575
token: WORD_TOKEN,
7676
onFocus: jest.fn(),
77-
} as const;
77+
};
7878
}
7979

8080
const PUNCT_TOKEN = {

src/components/SegmentView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ type SegmentViewProps = Readonly<{
3131
* @param props.focusedTokenId - When set, the matching word token's `PhraseBox` is rendered in the
3232
* focused state; only meaningful in `token-chip` mode.
3333
* @param props.isActive - Whether this segment is the currently selected verse
34-
* @param props.onSelect - Called when the segment or one of its word tokens is interacted with. In
35-
* `baseline-text` mode the whole segment is clickable and `tokenId` is omitted. In `token-chip`
36-
* mode only word tokens trigger this callback and `tokenId` is always provided; omit to render
37-
* word tokens as non-interactive spans.
34+
* @param props.onSelect - Required callback invoked when the segment or one of its word tokens is
35+
* interacted with. In `baseline-text` mode the whole segment is clickable and `tokenId` is
36+
* omitted. In `token-chip` mode only word tokens trigger this callback and `tokenId` is always
37+
* provided.
3838
* @param props.segment - The segment to render
3939
* @returns A button (baseline-text mode) or div (token-chip mode) containing a verse label and
4040
* segment content

0 commit comments

Comments
 (0)