Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip: Remove deprecated 'shortcut' prop #138

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023 New Vector Ltd
Copyright 2023-2024 New Vector Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,10 +36,6 @@ type TooltipProps = {
* The tooltip caption
*/
caption?: string;
/**
* @deprecated replaced by `caption`
*/
shortcut?: string;
/**
* The side where the tooltip is rendered
* @default bottom
Expand Down Expand Up @@ -96,7 +92,6 @@ export const Tooltip = ({
children,
label,
caption,
shortcut,
side = "bottom",
align = "center",
onEscapeKeyDown,
Expand Down Expand Up @@ -128,9 +123,9 @@ export const Tooltip = ({
using the text color secondary on a solid dark background.
This is temporary and should only remain until we figure out
the approach to on-solid tokens */}
{(caption || shortcut) && (
{caption && (
<span className={classNames(styles.caption, "cpd-theme-dark")}>
{caption ?? shortcut}
{caption}
</span>
)}
<Arrow width={10} height={6} className={styles.arrow} />
Expand Down
Loading