PeerChip: Adjusted styles (#5438)

This commit is contained in:
Alexander Zinchuk 2025-01-21 18:20:36 +01:00
parent 806bc0385a
commit d61cd446b8
8 changed files with 2 additions and 19 deletions

View File

@ -5,7 +5,7 @@
height: 2rem; height: 2rem;
min-width: 2rem; min-width: 2rem;
margin-inline: 0.25rem; margin-inline: 0.25rem;
padding-right: 1rem; padding-right: 0.75rem;
border-radius: 1rem; border-radius: 1rem;
cursor: var(--custom-cursor, pointer); cursor: var(--custom-cursor, pointer);
position: relative; position: relative;
@ -13,8 +13,6 @@
flex-shrink: 1; flex-shrink: 1;
transition: background-color 0.15s ease; transition: background-color 0.15s ease;
max-width: calc(50% - 0.5rem);
&.minimized { &.minimized {
padding-right: 0; padding-right: 0;
} }
@ -41,10 +39,6 @@
} }
} }
&.fluid {
max-width: unset;
}
&.notClickable { &.notClickable {
cursor: default; cursor: default;
} }

View File

@ -33,7 +33,6 @@ type OwnProps<T = undefined> = {
canClose?: boolean; canClose?: boolean;
isCloseNonDestructive?: boolean; isCloseNonDestructive?: boolean;
className?: string; className?: string;
fluid?: boolean;
withPeerColors?: boolean; withPeerColors?: boolean;
withEmojiStatus?: boolean; withEmojiStatus?: boolean;
clickArg?: T; clickArg?: T;
@ -58,7 +57,6 @@ const PeerChip = <T,>({
mockPeer, mockPeer,
customPeer, customPeer,
className, className,
fluid,
isSavedMessages, isSavedMessages,
withPeerColors, withPeerColors,
withEmojiStatus, withEmojiStatus,
@ -106,7 +104,6 @@ const PeerChip = <T,>({
isMinimized && styles.minimized, isMinimized && styles.minimized,
canClose && styles.closeable, canClose && styles.closeable,
isCloseNonDestructive && styles.nonDestructive, isCloseNonDestructive && styles.nonDestructive,
fluid && styles.fluid,
!onClick && styles.notClickable, !onClick && styles.notClickable,
withPeerColors && getPeerColorClass(customPeer || peer), withPeerColors && getPeerColorClass(customPeer || peer),
className, className,

View File

@ -45,6 +45,7 @@
.peerChip { .peerChip {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
max-width: calc(50% - 0.5rem);
} }
.pickerList { .pickerList {

View File

@ -226,7 +226,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
<PeerChip <PeerChip
icon="calendar" icon="calendar"
title={selectedSearchDate} title={selectedSearchDate}
fluid
canClose canClose
isMinimized={Boolean(globalSearchChatId)} isMinimized={Boolean(globalSearchChatId)}
className="left-search-picker-item" className="left-search-picker-item"
@ -240,7 +239,6 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
className="left-search-picker-item" className="left-search-picker-item"
peerId={globalSearchChatId} peerId={globalSearchChatId}
onClick={setGlobalSearchChatId} onClick={setGlobalSearchChatId}
fluid
canClose canClose
isMinimized isMinimized
clickArg={CLEAR_CHAT_SEARCH_PARAM} clickArg={CLEAR_CHAT_SEARCH_PARAM}

View File

@ -163,7 +163,6 @@ const Giveaway = ({
<PeerChip <PeerChip
peerId={peerId} peerId={peerId}
forceShowSelf forceShowSelf
fluid
withPeerColors={!isOwn} withPeerColors={!isOwn}
className={styles.peer} className={styles.peer}
clickArg={peerId} clickArg={peerId}
@ -206,7 +205,6 @@ const Giveaway = ({
<PeerChip <PeerChip
peerId={peerId} peerId={peerId}
forceShowSelf forceShowSelf
fluid
withPeerColors={!isOwn} withPeerColors={!isOwn}
className={styles.peer} className={styles.peer}
clickArg={peerId} clickArg={peerId}

View File

@ -521,7 +521,6 @@ const MiddleSearch: FC<StateProps> = ({
return ( return (
<PeerChip <PeerChip
className={buildClassName(styles.searchType, isSelected && styles.selectedType)} className={buildClassName(styles.searchType, isSelected && styles.selectedType)}
fluid
peerId={chat?.id} peerId={chat?.id}
title={oldLang('SearchThisChat')} title={oldLang('SearchThisChat')}
clickArg="chat" clickArg="chat"
@ -532,7 +531,6 @@ const MiddleSearch: FC<StateProps> = ({
return ( return (
<PeerChip <PeerChip
className={buildClassName(styles.searchType, isSelected && styles.selectedType)} className={buildClassName(styles.searchType, isSelected && styles.selectedType)}
fluid
peerId={currentUserId} peerId={currentUserId}
forceShowSelf forceShowSelf
title={oldLang('SearchMyMessages')} title={oldLang('SearchMyMessages')}
@ -544,7 +542,6 @@ const MiddleSearch: FC<StateProps> = ({
return ( return (
<PeerChip <PeerChip
className={buildClassName(styles.searchType, isSelected && styles.selectedType)} className={buildClassName(styles.searchType, isSelected && styles.selectedType)}
fluid
customPeer={CHANNELS_PEER} customPeer={CHANNELS_PEER}
title={oldLang('SearchPublicPosts')} title={oldLang('SearchPublicPosts')}
clickArg="channels" clickArg="channels"

View File

@ -124,7 +124,6 @@ const CollectibleInfoModal: FC<OwnProps & StateProps> = ({
{title && renderText(title, ['simple_markdown'])} {title && renderText(title, ['simple_markdown'])}
</h3> </h3>
<PeerChip <PeerChip
fluid
className={styles.chip} className={styles.chip}
peerId={modal?.peerId} peerId={modal?.peerId}
forceShowSelf forceShowSelf

View File

@ -78,7 +78,6 @@ const TableInfoModal = ({
peerId={value.chatId} peerId={value.chatId}
className={styles.chatItem} className={styles.chatItem}
forceShowSelf forceShowSelf
fluid
withEmojiStatus={value.withEmojiStatus} withEmojiStatus={value.withEmojiStatus}
clickArg={value.chatId} clickArg={value.chatId}
onClick={handleOpenChat} onClick={handleOpenChat}