Skip to content

Commit

Permalink
fixed card key truncate
Browse files Browse the repository at this point in the history
  • Loading branch information
seeden committed May 11, 2022
1 parent f3392ab commit 725d77a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions packages/core/src/components/CardKeyValue/CardKeyValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ const StyledTableCell= styled(({ hideDivider, ...rest }) => (
padding-right: 0 !important;
`
: ''}
`;

type Props = {
export type CardKeyValueProps = {
rows: {
key: string;
label: ReactNode;
Expand All @@ -34,7 +33,7 @@ type Props = {
size?: 'small' | 'normal' | 'large';
};

export default function CardKeyValue(props: Props) {
export default function CardKeyValue(props: CardKeyValueProps) {
const { rows, label, hideDivider, size } = props;

return (
Expand All @@ -47,11 +46,13 @@ export default function CardKeyValue(props: Props) {
{row.label}
</Typography>
</StyledTableCell>
<StyledTableCell align="right" hideDivider={hideDivider}>
<Box maxWidth="100%">
<Typography component='div' variant="body2" noWrap>
{row.value}
</Typography>
<StyledTableCell hideDivider={hideDivider} width="100%">
<Box ml={2} position="relative">
<Box position="absolute" left="0" top="0" bottom="0" right="0" display="flex" alignItems="center" justifyContent="flex-end">
<Typography component='div' variant="body2" noWrap>
{row.value}
</Typography>
</Box>
</Box>
</StyledTableCell>
</TableRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default function LayoutDashboard(props: LayoutDashboardProps) {
&nbsp;
*/}
<Tooltip title={<Trans>Logout</Trans>}>
<IconButton onClick={handleLogout} title={t`Log Out`}>
<IconButton onClick={handleLogout}>
<ExitToAppIcon />
</IconButton>
</Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/Truncate/Truncate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function parseValue(props) {
leftLength = 4,
rightLength = 4,
splitSeparator = ':',
prefixes = ['nft1', 'nft0', 'xch', 'txch'],
prefixes = ['nft1', 'nft0', 'txch', 'xch', '0x'],
} = props;

if (!children) {
Expand Down

0 comments on commit 725d77a

Please sign in to comment.