Skip to content

Commit 6ef885f

Browse files
author
Vir Desai
committed
changing component name from ActionSheet to ActionSheetAttachment
1 parent 49d4db5 commit 6ef885f

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

src/components/MessageInput/MessageInput.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { pickImage, pickDocument } from '../../native';
2020
import { FileState, ACITriggerSettings } from '../../utils';
2121
import { themed } from '../../styles/theme';
2222

23-
import ActionSheet from './ActionSheet';
23+
import ActionSheetAttachment from './ActionSheetAttachment';
2424
import SendButton from './SendButton';
2525
import AttachButton from './AttachButton';
2626
import ImageUploadPreview from './ImageUploadPreview';
@@ -180,11 +180,14 @@ class MessageInput extends PureComponent {
180180
* */
181181
AttachButton: PropTypes.oneOfType([PropTypes.node, PropTypes.elementType]),
182182
/**
183-
* Custom UI component for ActionSheet.
183+
* Custom UI component for ActionSheetAttachment.
184184
*
185-
* Defaults to and accepts same props as: [ActionSheet](https://getstream.github.io/stream-chat-react-native/#actionsheet)
185+
* Defaults to and accepts same props as: [ActionSheetAttachment](https://getstream.github.io/stream-chat-react-native/#actionsheetattachment)
186186
* */
187-
ActionSheet: PropTypes.oneOfType([PropTypes.node, PropTypes.elementType]),
187+
ActionSheetAttachment: PropTypes.oneOfType([
188+
PropTypes.node,
189+
PropTypes.elementType,
190+
]),
188191
/**
189192
* Additional props for underlying TextInput component. These props will be forwarded as it is to TextInput component.
190193
*
@@ -213,7 +216,7 @@ class MessageInput extends PureComponent {
213216
};
214217

215218
static defaultProps = {
216-
ActionSheet,
219+
ActionSheetAttachment,
217220
AttachButton,
218221
disabled: false,
219222
hasFilePicker: true,
@@ -869,7 +872,7 @@ class MessageInput extends PureComponent {
869872
work well with async onPress operations. So find a solution.
870873
*/}
871874

872-
<ActionSheet
875+
<ActionSheetAttachment
873876
setAttachActionSheetRef={this.setInputBoxRef}
874877
closeAttachActionSheet={this.closeAttachActionSheet}
875878
pickFile={this._pickFile}

src/components/MessageInput/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { default as ActionSheet } from './ActionSheet';
1+
export { default as ActionSheetAttachment } from './ActionSheetAttachment';
22
export { default as AttachButton } from './AttachButton';
33
export { default as FileUploadPreview } from './FileUploadPreview';
44
export { default as ImageUploadPreview } from './ImageUploadPreview';

styleguide.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module.exports = {
108108
'src/components/MessageInput/ImageUploadPreview.js',
109109
'src/components/MessageInput/FileUploadPreview.js',
110110
'src/components/MessageInput/SendButton.js',
111-
'src/components/MessageInput/ActionSheet.js',
111+
'src/components/MessageInput/ActionSheetAttachment.js',
112112
'src/components/MessageInput/AttachButton.js',
113113
'src/components/AutoCompleteInput/AutoCompleteInput.js',
114114
'src/components/AutoCompleteInput/CommandsItem.js',

types/index.d.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export interface MessageInputProps
288288
actionSheetStyles?: object;
289289
AttachmentFileIcon?: React.ElementType<FileIconUIComponentProps>;
290290
AttachButton?: React.ElementType<AttachButtonProps>;
291-
ActionSheet?: React.ElementType<ActionSheetProps>;
291+
ActionSheetAttachment?: React.ElementType<ActionSheetAttachmentProps>;
292292
SendButton: React.ElementType<SendButtonProps>;
293293
additionalTextInputProps?: object;
294294
}
@@ -1153,7 +1153,7 @@ export interface AttachButtonProps extends StyledComponentProps {
11531153
handleOnPress(): void;
11541154
}
11551155

1156-
export interface ActionSheetProps extends StyledComponentProps {
1156+
export interface ActionSheetAttachmentProps extends StyledComponentProps {
11571157
/** Hides the attach actionsheet */
11581158
closeAttachActionSheet?(): void;
11591159
/** Handler for attach file functionality */
@@ -1270,7 +1270,10 @@ export class TypingIndicator extends React.PureComponent<
12701270
export class MessageInput extends React.PureComponent<MessageInputProps, any> {}
12711271

12721272
export class AttachButton extends React.PureComponent<AttachButtonProps, any> {}
1273-
export class ActionSheet extends React.PureComponent<ActionSheetProps, any> {}
1273+
export class ActionSheetAttachment extends React.PureComponent<
1274+
ActionSheetAttachmentProps,
1275+
any
1276+
> {}
12741277
export class SendButton extends React.PureComponent<SendButtonProps> {}
12751278
export class MessageSimple extends React.PureComponent<
12761279
MessageUIComponentProps,

0 commit comments

Comments
 (0)