Skip to content

Commit

Permalink
feat: add style props
Browse files Browse the repository at this point in the history
  • Loading branch information
tewarig committed Feb 2, 2025
1 parent b6c16a1 commit fdb74de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ const Template = (args) => (
<ChatBubble
senderType="other"
leading={<RayIcon size="xlarge" color="surface.background.sea.intense" />}
style={{ alignSelf: 'flex-start' }}
alignSelf="flex-start"
>
Hi, my name is Ray. How can I help you today?
</ChatBubble>
<ChatBubble senderType="self" style={{ alignSelf: 'flex-end' }}>
<ChatBubble senderType="self" alignSelf="flex-end">
Can you help me with payment intregation?
</ChatBubble>
<ChatBubble
Expand All @@ -45,7 +45,7 @@ const Template = (args) => (
</ChatBubble>
<ChatBubble
senderType="self"
style={{ alignSelf: 'flex-end' }}
alignSelf="flex-end"
validationState="error"
errorText="Unable to send the message"
messageType="last"
Expand Down
1 change: 0 additions & 1 deletion packages/blade/src/components/ChatBubble/Rotate.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const Rotate = ({
style={{
display: 'flex',
}}
// use animate prop to control the animation
animate={{ rotate: animate ? 90 : 0 }}
transition={{
duration: msToSeconds(theme.motion.duration.gentle),
Expand Down
6 changes: 4 additions & 2 deletions packages/blade/src/components/ChatBubble/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import type React from 'react';
import type { BaseBoxProps } from '~components/Box/BaseBox';
import type { StringChildrenType } from '~utils/types';

type ChatBubbleStyleProps = BaseBoxProps;
type ChatBubbleProps = {
messageType?: 'last' | 'default';
senderType?: 'self' | 'other';
Expand All @@ -11,8 +14,7 @@ type ChatBubbleProps = {
children?: React.ReactNode | StringChildrenType;
leading?: React.ReactNode;
loadingText?: string;
};

} & ChatBubbleStyleProps;
type DefaultMessageBubbleProps = {
children: React.ReactNode | string;
leading?: React.ReactNode;
Expand Down

0 comments on commit fdb74de

Please sign in to comment.