mirror of
https://github.com/lux-tel/session-desktop.git
synced 2026-10-30 20:33:24 +00:00
and made some refactoring to share the components between UserDetails and ConversationSettings
43 lines
1.0 KiB
TypeScript
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>
|
|
);
|
|
};
|