mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
style(console): successful tooltip state (#2789)
This commit is contained in:
parent
2b2c5ecb7c
commit
c92120b1c1
7 changed files with 12 additions and 10 deletions
|
@ -65,7 +65,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.successfulTooltip {
|
||||
background-color: var(--color-success-60);
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ const CopyToClipboard = ({
|
|||
</IconButton>
|
||||
)}
|
||||
<Tooltip
|
||||
className={classNames(copyState === 'copied' && styles.successfulTooltip)}
|
||||
isSuccessful={copyState === 'copied'}
|
||||
anchorClassName={styles.copyToolTipAnchor}
|
||||
content={t(copyState)}
|
||||
>
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
font: var(--font-body-medium);
|
||||
max-width: 300px;
|
||||
|
||||
&.successful {
|
||||
background: var(--color-success-60);
|
||||
}
|
||||
|
||||
&.invisible {
|
||||
opacity: 0%;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ type Props = HTMLProps<HTMLDivElement> & {
|
|||
placement?: TipBubblePlacement;
|
||||
horizontalAlignment?: HorizontalAlignment;
|
||||
className?: string;
|
||||
isSuccessful?: boolean;
|
||||
};
|
||||
|
||||
const supportHorizontalAlignmentPlacements = new Set<TipBubblePlacement>(['top', 'bottom']);
|
||||
|
@ -28,6 +29,7 @@ const TipBubble = (
|
|||
horizontalAlignment = 'center',
|
||||
className,
|
||||
anchorRef,
|
||||
isSuccessful,
|
||||
...rest
|
||||
}: Props,
|
||||
reference: ForwardedRef<HTMLDivElement>
|
||||
|
@ -53,6 +55,7 @@ const TipBubble = (
|
|||
styles.tipBubble,
|
||||
styles[placement],
|
||||
!position && styles.invisible,
|
||||
isSuccessful && styles.successful,
|
||||
className
|
||||
)}
|
||||
style={{ ...position }}
|
||||
|
|
|
@ -18,6 +18,7 @@ import * as styles from './index.module.scss';
|
|||
type Props = {
|
||||
className?: string;
|
||||
isKeepOpen?: boolean;
|
||||
isSuccessful?: boolean;
|
||||
placement?: TipBubblePlacement;
|
||||
horizontalAlign?: HorizontalAlignment;
|
||||
anchorClassName?: string;
|
||||
|
@ -28,6 +29,7 @@ type Props = {
|
|||
const Tooltip = ({
|
||||
className,
|
||||
isKeepOpen = false,
|
||||
isSuccessful = false,
|
||||
placement = 'top',
|
||||
horizontalAlign = 'center',
|
||||
anchorClassName,
|
||||
|
@ -135,6 +137,7 @@ const Tooltip = ({
|
|||
position={position}
|
||||
placement={placement}
|
||||
horizontalAlignment={positionState.horizontalAlign}
|
||||
isSuccessful={isSuccessful}
|
||||
>
|
||||
<div className={styles.content}>{content}</div>
|
||||
</TipBubble>,
|
||||
|
|
|
@ -24,7 +24,3 @@
|
|||
font: var(--font-body-medium);
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.successfulTooltip {
|
||||
background-color: var(--color-success-60);
|
||||
}
|
||||
|
|
|
@ -103,8 +103,8 @@ const SenderTester = ({ connectorId, connectorType, config, className }: Props)
|
|||
</FormField>
|
||||
<Tooltip
|
||||
isKeepOpen
|
||||
isSuccessful
|
||||
anchorClassName={styles.send}
|
||||
className={styles.successfulTooltip}
|
||||
content={conditional(showTooltip && t('connector_details.test_message_sent'))}
|
||||
>
|
||||
<Button
|
||||
|
|
Loading…
Reference in a new issue