0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-10 22:22:45 -05:00

chore(console,toolkit): update custom JWT details page code editor action buttons style

This commit is contained in:
Darcy Ye 2024-04-03 11:25:58 +08:00
parent 7f3cd97b44
commit 4a60bf40e8
No known key found for this signature in database
GPG key ID: B46F4C07EDEFC610
4 changed files with 6 additions and 19 deletions

View file

@ -42,10 +42,6 @@
.copyToolTipAnchor { .copyToolTipAnchor {
margin-left: _.unit(2); margin-left: _.unit(2);
&.leftMarginIgnored {
margin-left: 0;
}
} }
} }
@ -53,10 +49,6 @@
.row { .row {
.copyToolTipAnchor { .copyToolTipAnchor {
margin-left: _.unit(3); margin-left: _.unit(3);
&.leftMarginIgnored {
margin-left: 0;
}
} }
} }
} }
@ -65,10 +57,6 @@
.row { .row {
.copyToolTipAnchor { .copyToolTipAnchor {
margin-left: _.unit(1); margin-left: _.unit(1);
&.leftMarginIgnored {
margin-left: 0;
}
} }
.iconButton { .iconButton {

View file

@ -32,7 +32,6 @@ type Props = {
size?: 'default' | 'small'; size?: 'default' | 'small';
isWordWrapAllowed?: boolean; isWordWrapAllowed?: boolean;
isFullWidth?: boolean; isFullWidth?: boolean;
isLeftMarginIgnored?: boolean;
}; };
type CopyState = TFuncKey<'translation', 'admin_console.general'>; type CopyState = TFuncKey<'translation', 'admin_console.general'>;
@ -48,7 +47,6 @@ function CopyToClipboard(
size = 'default', size = 'default',
isWordWrapAllowed = false, isWordWrapAllowed = false,
isFullWidth = false, isFullWidth = false,
isLeftMarginIgnored = false,
}: Props, }: Props,
ref: ForwardedRef<HTMLDivElement> ref: ForwardedRef<HTMLDivElement>
) { ) {
@ -128,10 +126,7 @@ function CopyToClipboard(
)} )}
<Tooltip <Tooltip
isSuccessful={copyState === 'copied'} isSuccessful={copyState === 'copied'}
anchorClassName={classNames( anchorClassName={styles.copyToolTipAnchor}
styles.copyToolTipAnchor,
isLeftMarginIgnored && styles.leftMarginIgnored
)}
content={t(copyState)} content={t(copyState)}
> >
<IconButton <IconButton

View file

@ -62,6 +62,11 @@
&:active { &:active {
background: var(--color-overlay-dark-bg-pressed); background: var(--color-overlay-dark-bg-pressed);
} }
// TODO (LOG-8602): Remove the default left margin of CopyToClipboard copyToolTipAnchor component.
div[class*='copyToolTipAnchor'] {
margin-left: 0;
}
} }
} }
} }

View file

@ -168,7 +168,6 @@ function MonacoCodeEditor({
)} )}
{enabledActions.includes('copy') && ( {enabledActions.includes('copy') && (
<CopyToClipboard <CopyToClipboard
isLeftMarginIgnored
variant="icon" variant="icon"
value={editorRef.current?.getValue() ?? ''} value={editorRef.current?.getValue() ?? ''}
className={styles.iconButton} className={styles.iconButton}