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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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