Skip to content

Commit e07939c

Browse files
authored
chore(code): remove deprecated prop warnings and storybook references (#3171)
* fix(code): remove mention of removed props * chore(code): changeset
1 parent 22b4d82 commit e07939c

File tree

3 files changed

+5
-21
lines changed

3 files changed

+5
-21
lines changed

.changeset/nasty-planets-tap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@leafygreen-ui/code': patch
3+
---
4+
5+
Remove mentions of props removed in v18

packages/code/src/Code.stories.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ const meta: StoryMetaType<typeof Code> = {
109109
},
110110
argTypes: {
111111
isLoading: { control: 'boolean' },
112-
copyable: { control: 'boolean' },
113112
expandable: { control: 'boolean' },
114113
showLineNumbers: { control: 'boolean' },
115114
highlightLines: { control: 'boolean' },
@@ -231,7 +230,6 @@ WithLanguageSwitcher.parameters = {
231230
exclude: [
232231
'highlightLines',
233232
'copyButtonAppearance',
234-
'copyable',
235233
'children',
236234
'expandable',
237235
],

packages/code/src/Code/Code.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -67,25 +67,6 @@ function Code({
6767

6868
const showPanel = !!panel;
6969

70-
if (
71-
// @ts-expect-error detecting deprecated props
72-
rest.copyable ||
73-
// @ts-expect-error detecting deprecated props
74-
rest.showCustomActionButtons ||
75-
// @ts-expect-error detecting deprecated props
76-
rest.languageOptions ||
77-
// @ts-expect-error detecting deprecated props
78-
rest.customActionButtons ||
79-
// @ts-expect-error detecting deprecated props
80-
rest.chromeTitle ||
81-
// @ts-expect-error detecting deprecated props
82-
rest.onChange
83-
) {
84-
console.warn(
85-
'The following props are deprecated and have been removed: copyable, showCustomActionButtons, languageOptions, customActionButtons, chromeTitle, onChange. Please use the Panel component instead.',
86-
);
87-
}
88-
8970
useIsomorphicLayoutEffect(() => {
9071
const scrollableElement = scrollableElementRef.current;
9172

0 commit comments

Comments
 (0)