Skip to content

Commit 21aaa42

Browse files
committed
fix: type export from audio recording button
1 parent 90bd97c commit 21aaa42

File tree

1 file changed

+28
-29
lines changed

1 file changed

+28
-29
lines changed

package/src/components/MessageInput/components/AudioRecorder/AudioRecordingButton.tsx

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,35 +10,34 @@ import { useTranslationContext } from '../../../../contexts/translationContext/T
1010
import { Mic } from '../../../../icons/Mic';
1111
import { AudioRecordingReturnType, NativeHandlers } from '../../../../native';
1212

13-
type AudioRecordingButtonProps = Pick<
14-
MessageInputContextValue,
15-
'asyncMessagesMinimumPressDuration'
16-
> & {
17-
/**
18-
* The current voice recording that is in progress.
19-
*/
20-
recording: AudioRecordingReturnType;
21-
/**
22-
* Size of the mic button.
23-
*/
24-
buttonSize?: number;
25-
/**
26-
* Handler to determine what should happen on long press of the mic button.
27-
*/
28-
handleLongPress?: () => void;
29-
/**
30-
* Handler to determine what should happen on press of the mic button.
31-
*/
32-
handlePress?: () => void;
33-
/**
34-
* Boolean to determine if the audio recording permissions are granted.
35-
*/
36-
permissionsGranted?: boolean;
37-
/**
38-
* Function to start the voice recording.
39-
*/
40-
startVoiceRecording?: () => Promise<void>;
41-
};
13+
export type AudioRecordingButtonProps = Partial<
14+
Pick<MessageInputContextValue, 'asyncMessagesMinimumPressDuration'> & {
15+
/**
16+
* The current voice recording that is in progress.
17+
*/
18+
recording: AudioRecordingReturnType;
19+
/**
20+
* Size of the mic button.
21+
*/
22+
buttonSize?: number;
23+
/**
24+
* Handler to determine what should happen on long press of the mic button.
25+
*/
26+
handleLongPress?: () => void;
27+
/**
28+
* Handler to determine what should happen on press of the mic button.
29+
*/
30+
handlePress?: () => void;
31+
/**
32+
* Boolean to determine if the audio recording permissions are granted.
33+
*/
34+
permissionsGranted?: boolean;
35+
/**
36+
* Function to start the voice recording.
37+
*/
38+
startVoiceRecording?: () => Promise<void>;
39+
}
40+
>;
4241

4342
/**
4443
* Component to display the mic button on the Message Input.

0 commit comments

Comments
 (0)