mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-13 18:50:29 +03:00
parent
20443f8a4d
commit
c9ec161ccc
10 changed files with 348 additions and 7 deletions
|
|
@ -41,7 +41,7 @@ RoomSelectorWrapper.propTypes = {
|
|||
};
|
||||
|
||||
function RoomSelector({
|
||||
name, roomId, imageSrc, iconSrc,
|
||||
name, parentName, roomId, imageSrc, iconSrc,
|
||||
isSelected, isUnread, notificationCount, isAlert,
|
||||
options, onClick,
|
||||
}) {
|
||||
|
|
@ -58,7 +58,15 @@ function RoomSelector({
|
|||
iconSrc={iconSrc}
|
||||
size="extra-small"
|
||||
/>
|
||||
<Text variant="b1">{twemojify(name)}</Text>
|
||||
<Text variant="b1">
|
||||
{twemojify(name)}
|
||||
{parentName && (
|
||||
<span className="text text-b3">
|
||||
{' — '}
|
||||
{twemojify(parentName)}
|
||||
</span>
|
||||
)}
|
||||
</Text>
|
||||
{ isUnread && (
|
||||
<NotificationBadge
|
||||
alert={isAlert}
|
||||
|
|
@ -73,6 +81,7 @@ function RoomSelector({
|
|||
);
|
||||
}
|
||||
RoomSelector.defaultProps = {
|
||||
parentName: null,
|
||||
isSelected: false,
|
||||
imageSrc: null,
|
||||
iconSrc: null,
|
||||
|
|
@ -80,6 +89,7 @@ RoomSelector.defaultProps = {
|
|||
};
|
||||
RoomSelector.propTypes = {
|
||||
name: PropTypes.string.isRequired,
|
||||
parentName: PropTypes.string,
|
||||
roomId: PropTypes.string.isRequired,
|
||||
imageSrc: PropTypes.string,
|
||||
iconSrc: PropTypes.string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue