Files
Audric Ackermann 347a62409b feat: added nickname to UserDetailsDialog
and made some refactoring to share the components between UserDetails
and ConversationSettings
2025-07-29 14:25:00 +10:00

43 lines
1.0 KiB
TypeScript

import styled from 'styled-components';
import { tr } from '../../localization/localeTools';
const StyledPillDividerLine = styled.div`
border-bottom: 1px solid var(--border-color);
line-height: 0.1rem;
flex-grow: 1;
height: 1px;
align-self: center;
`;
const StyledPillSpan = styled.span`
padding: 6px 15px 5px;
border-radius: 50px;
color: var(--text-secondary-color);
border: 1px solid var(--border-color);
`;
const StyledPillDivider = styled.div`
width: 100%;
text-align: center;
display: flex;
margin: 0;
`;
export const AccountIdPill = ({ accountType }: { accountType: 'ours' | 'theirs' | 'blinded' }) => {
return (
<StyledPillDivider data-testid="account-id-pill">
<StyledPillDividerLine />
<StyledPillSpan>
{tr(
accountType === 'blinded'
? 'blindedId'
: accountType === 'ours'
? 'accountIdYours'
: 'accountId'
)}
</StyledPillSpan>
<StyledPillDividerLine />
</StyledPillDivider>
);
};