Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/nasty-planets-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/code': patch
---

Remove mentions of props removed in v18
2 changes: 0 additions & 2 deletions packages/code/src/Code.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ const meta: StoryMetaType<typeof Code> = {
},
argTypes: {
isLoading: { control: 'boolean' },
copyable: { control: 'boolean' },
expandable: { control: 'boolean' },
showLineNumbers: { control: 'boolean' },
highlightLines: { control: 'boolean' },
Expand Down Expand Up @@ -231,7 +230,6 @@ WithLanguageSwitcher.parameters = {
exclude: [
'highlightLines',
'copyButtonAppearance',
'copyable',
'children',
'expandable',
],
Expand Down
19 changes: 0 additions & 19 deletions packages/code/src/Code/Code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,6 @@ function Code({

const showPanel = !!panel;

if (
// @ts-expect-error detecting deprecated props
rest.copyable ||
// @ts-expect-error detecting deprecated props
rest.showCustomActionButtons ||
// @ts-expect-error detecting deprecated props
rest.languageOptions ||
// @ts-expect-error detecting deprecated props
rest.customActionButtons ||
// @ts-expect-error detecting deprecated props
rest.chromeTitle ||
// @ts-expect-error detecting deprecated props
rest.onChange
) {
console.warn(
'The following props are deprecated and have been removed: copyable, showCustomActionButtons, languageOptions, customActionButtons, chromeTitle, onChange. Please use the Panel component instead.',
);
}

useIsomorphicLayoutEffect(() => {
const scrollableElement = scrollableElementRef.current;

Expand Down
Loading