Skip to main content

ChatPressableIcon

Works with ChatInput component

Example

import {useState} from 'react';

import {
ChatPressableIcon
} from '@lad-tech/mobydick-core';

export const ChatWidget = () => {
const [input, setInput] = useState('');
const [myMessages, setMyMessages] = useState([
{time: '12-12-1998', isMe: true, message: 'message'},
]);

const onSend = () => {
setMyMessages([
...myMessages,
{
time: new Date().toString(),
isMe: true,
message: input,
},
]);
setInput('');
};

return (
<ChatPressableIcon name={'icon-send'} onPress={onSend} />
);
};

Props

TouchableOpacity Props

Inherits TouchableOpacity Props.

Required
name

TYPE
SimpleIconName

color

TYPE
SimpleIconName

Color for icon

backgroundColor

TYPE
SimpleIconName