-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/leemonade/bubbles into d…
…evelop
- Loading branch information
Showing
32 changed files
with
204 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 67 additions & 64 deletions
131
packages/components/src/informative/ChatMessage/ChatMessage.styles.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,70 @@ | ||
import { createStyles } from '@mantine/styles'; | ||
|
||
export const ChatMessageStyles = createStyles((theme, { isOwn, isTeacher, isAdmin, selected }) => { | ||
const messageBox = {}; | ||
if (isOwn) { | ||
messageBox.borderRight = `2px solid #878D96`; | ||
} else { | ||
messageBox.borderLeft = `2px solid #878D96`; | ||
} | ||
export const ChatMessageStyles = createStyles( | ||
(theme, { isOwn, previoudMessageIsSameUser, isTeacher, isAdmin, selected }) => { | ||
const messageBox = {}; | ||
if (isOwn) { | ||
messageBox.borderRight = `2px solid #878D96`; | ||
} else { | ||
messageBox.borderLeft = `2px solid #878D96`; | ||
} | ||
|
||
return { | ||
root: { | ||
marginTop: theme.spacing[4], | ||
padding: theme.spacing[2], | ||
background: selected ? '#E4F4E6' : 'transparent', | ||
display: 'flex', | ||
justifyContent: isOwn ? 'end' : 'start', | ||
alignItems: 'end', | ||
gap: theme.spacing[1], | ||
transition: 'background 0.3s ease', | ||
}, | ||
message: { | ||
color: theme.other.global.content.color.text.default, | ||
fontFamily: 'Albert Sans', | ||
fontSize: 14, | ||
fontStyle: 'normal', | ||
fontWeight: 400, | ||
lineHeight: '20px', | ||
}, | ||
messageBox: { | ||
padding: theme.spacing[2], | ||
paddingLeft: theme.spacing[3], | ||
borderRadius: '2px', | ||
backgroundColor: '#FFFFFF', | ||
...messageBox, | ||
}, | ||
messageBoxInner: { | ||
display: 'flex', | ||
alignItems: 'end', | ||
gap: theme.spacing[2], | ||
}, | ||
messageDate: { | ||
display: 'block', | ||
textAlign: 'right', | ||
color: theme.other.global.content.color.text.muted, | ||
fontFamily: 'Albert Sans', | ||
fontSize: 12, | ||
fontStyle: 'normal', | ||
fontWeight: 400, | ||
lineHeight: '16px', | ||
}, | ||
name: { | ||
overflow: 'hidden', | ||
textOverflow: 'ellipsis', | ||
whiteSpace: 'nowrap', | ||
color: theme.other.global.content.color.text.muted, | ||
fontFamily: 'Albert Sans', | ||
fontSize: 12, | ||
fontStyle: 'normal', | ||
fontWeight: 400, | ||
lineHeight: '16px', | ||
}, | ||
avatar: { | ||
display: 'flex', | ||
}, | ||
}; | ||
}); | ||
return { | ||
root: { | ||
marginTop: previoudMessageIsSameUser ? theme.spacing[1] : theme.spacing[2], | ||
padding: theme.spacing[2], | ||
background: selected ? '#E4F4E6' : 'transparent', | ||
display: 'flex', | ||
justifyContent: isOwn ? 'end' : 'start', | ||
alignItems: 'end', | ||
gap: theme.spacing[1], | ||
transition: 'background 0.3s ease', | ||
borderRadius: '4px 2px 2px 4px', | ||
}, | ||
message: { | ||
color: theme.other.global.content.color.text.default, | ||
fontFamily: 'Albert Sans', | ||
fontSize: 14, | ||
fontStyle: 'normal', | ||
fontWeight: 400, | ||
lineHeight: '20px', | ||
}, | ||
messageBox: { | ||
padding: theme.spacing[2], | ||
paddingLeft: theme.spacing[3], | ||
borderRadius: '2px', | ||
backgroundColor: '#FFFFFF', | ||
...messageBox, | ||
}, | ||
messageBoxInner: { | ||
display: 'flex', | ||
alignItems: 'end', | ||
gap: theme.spacing[2], | ||
}, | ||
messageDate: { | ||
display: 'block', | ||
textAlign: 'right', | ||
color: theme.other.global.content.color.text.muted, | ||
fontFamily: 'Albert Sans', | ||
fontSize: 12, | ||
fontStyle: 'normal', | ||
fontWeight: 400, | ||
lineHeight: '16px', | ||
}, | ||
name: { | ||
overflow: 'hidden', | ||
textOverflow: 'ellipsis', | ||
whiteSpace: 'nowrap', | ||
color: theme.other.global.content.color.text.muted, | ||
fontFamily: 'Albert Sans', | ||
fontSize: 12, | ||
fontStyle: 'normal', | ||
fontWeight: 400, | ||
lineHeight: '16px', | ||
}, | ||
avatar: { | ||
display: 'flex', | ||
}, | ||
}; | ||
}, | ||
); |
Oops, something went wrong.