From 88561de25c342f0531aa8917ca9f9aea3a35d84b Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Fri, 8 Jul 2022 14:54:25 +1000 Subject: [PATCH] Cleanup --- lib/blocks/src/blocks/ArgsTable.tsx | 2 +- lib/blocks/src/blocks/Description.tsx | 2 +- lib/blocks/src/blocks/types.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/blocks/src/blocks/ArgsTable.tsx b/lib/blocks/src/blocks/ArgsTable.tsx index d5565932f6d0..116ff04ac767 100644 --- a/lib/blocks/src/blocks/ArgsTable.tsx +++ b/lib/blocks/src/blocks/ArgsTable.tsx @@ -25,7 +25,7 @@ interface BaseProps { } type OfProps = BaseProps & { - of: '.' | '^' | Component; + of: '^' | Component; }; type ComponentsProps = BaseProps & { diff --git a/lib/blocks/src/blocks/Description.tsx b/lib/blocks/src/blocks/Description.tsx index 0a9bb07f612d..2eb5cdfa44a3 100644 --- a/lib/blocks/src/blocks/Description.tsx +++ b/lib/blocks/src/blocks/Description.tsx @@ -78,7 +78,7 @@ const DescriptionContainer: FunctionComponent = (props) => { // since we are in the docs blocks, assume default description if for primary component story DescriptionContainer.defaultProps = { - of: '.', + of: PRIMARY_STORY, }; export { DescriptionContainer as Description }; diff --git a/lib/blocks/src/blocks/types.ts b/lib/blocks/src/blocks/types.ts index 92eaa5b1ae0d..aab06d694a95 100644 --- a/lib/blocks/src/blocks/types.ts +++ b/lib/blocks/src/blocks/types.ts @@ -5,6 +5,7 @@ import { once } from '@storybook/client-logger'; */ export const CURRENT_SELECTION = '.'; export const currentSelectionWarning = () => + console.trace() || once.warn( '`of="."` (current selection) is no longer supported in doc blocks. Falling back to primary story' );