|
|
|
import React from 'react';
|
|
|
|
import styled from 'styled-components';
|
|
|
|
import { SessionIconButton } from '../../icon';
|
|
|
|
|
|
|
|
const StyledChatButtonContainer = styled.div`
|
|
|
|
.session-icon-button {
|
|
|
|
svg {
|
|
|
|
background-color: var(--chat-buttons-background-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover svg {
|
|
|
|
background-color: var(--chat-buttons-background-hover-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const AddStagedAttachmentButton = (props: { onClick: () => void }) => {
|
|
|
|
return (
|
|
|
|
<StyledChatButtonContainer>
|
|
|
|
<SessionIconButton
|
|
|
|
iconType="plusThin"
|
|
|
|
backgroundColor={'var(--chat-buttons-background-color)'}
|
|
|
|
iconColor={'var(--chat-buttons-icon-color)'}
|
|
|
|
iconSize={'huge2'}
|
|
|
|
borderRadius="300px"
|
|
|
|
iconPadding="8px"
|
|
|
|
onClick={props.onClick}
|
Adds data-testid to loading-animation, microphone recording button, recording permissions button, stop recording button, consolidates tests into user actions test, adds media to fixtures folder, updates linked device tests with avatar change, username change and group tests. Adds tests for messaging, sending image, video, document, gif and link with preview. Also updates reply message functionality to wait for loading animation
2 years ago
|
|
|
dataTestId="attachments-button"
|
|
|
|
/>
|
|
|
|
</StyledChatButtonContainer>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const StartRecordingButton = (props: { onClick: () => void }) => {
|
|
|
|
return (
|
|
|
|
<StyledChatButtonContainer>
|
|
|
|
<SessionIconButton
|
|
|
|
iconType="microphone"
|
|
|
|
iconSize={'huge2'}
|
|
|
|
backgroundColor={'var(--chat-buttons-background-color)'}
|
|
|
|
iconColor={'var(--chat-buttons-icon-color)'}
|
|
|
|
borderRadius="300px"
|
|
|
|
iconPadding="6px"
|
|
|
|
onClick={props.onClick}
|
Adds data-testid to loading-animation, microphone recording button, recording permissions button, stop recording button, consolidates tests into user actions test, adds media to fixtures folder, updates linked device tests with avatar change, username change and group tests. Adds tests for messaging, sending image, video, document, gif and link with preview. Also updates reply message functionality to wait for loading animation
2 years ago
|
|
|
dataTestId="microphone-button"
|
|
|
|
/>
|
|
|
|
</StyledChatButtonContainer>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const ToggleEmojiButton = React.forwardRef<HTMLDivElement, { onClick: () => void }>(
|
|
|
|
(props, ref) => {
|
|
|
|
return (
|
|
|
|
<StyledChatButtonContainer>
|
|
|
|
<SessionIconButton
|
|
|
|
iconType="emoji"
|
|
|
|
ref={ref}
|
|
|
|
backgroundColor={'var(--chat-buttons-background-color)'}
|
|
|
|
iconColor={'var(--chat-buttons-icon-color)'}
|
|
|
|
iconSize={'huge2'}
|
|
|
|
borderRadius="300px"
|
|
|
|
iconPadding="6px"
|
|
|
|
onClick={props.onClick}
|
Adds data-testid to loading-animation, microphone recording button, recording permissions button, stop recording button, consolidates tests into user actions test, adds media to fixtures folder, updates linked device tests with avatar change, username change and group tests. Adds tests for messaging, sending image, video, document, gif and link with preview. Also updates reply message functionality to wait for loading animation
2 years ago
|
|
|
dataTestId="emoji-button"
|
|
|
|
/>
|
|
|
|
</StyledChatButtonContainer>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
export const SendMessageButton = (props: { onClick: () => void }) => {
|
|
|
|
return (
|
|
|
|
<StyledChatButtonContainer className="send-message-button">
|
|
|
|
<SessionIconButton
|
|
|
|
iconType="send"
|
|
|
|
backgroundColor={'var(--chat-buttons-background-color)'}
|
|
|
|
iconColor={'var(--chat-buttons-icon-color)'}
|
|
|
|
iconSize={'huge2'}
|
|
|
|
iconRotation={90}
|
|
|
|
borderRadius="300px"
|
|
|
|
iconPadding="6px"
|
|
|
|
onClick={props.onClick}
|
|
|
|
dataTestId="send-message-button"
|
|
|
|
/>
|
|
|
|
</StyledChatButtonContainer>
|
|
|
|
);
|
|
|
|
};
|