-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: clean-up
episode-ai-summary
- Loading branch information
Showing
7 changed files
with
79 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
components/episode-ai-summary/episode-ai-summary-panel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import type { PropsWithChildren } from 'react'; | ||
|
||
import { CollapsiblePanel } from '../ui/collapsible-panel'; | ||
import { Panel } from '../ui/panel'; | ||
import { PreWrap } from '../ui/pre-wrap'; | ||
|
||
type Props = PropsWithChildren<{ | ||
variant?: 'collapsible' | 'default'; | ||
}>; | ||
|
||
export function EpisodeAISummaryPanel({ | ||
children, | ||
variant = 'default', | ||
}: Props) { | ||
return variant === 'collapsible' ? ( | ||
<CollapsiblePanel title="Episode summary"> | ||
<PreWrap>{children}</PreWrap> | ||
</CollapsiblePanel> | ||
) : ( | ||
<Panel title="Episode summary"> | ||
<PreWrap>{children}</PreWrap> | ||
</Panel> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { PropsWithChildren } from 'react'; | ||
|
||
import { Box } from '@radix-ui/themes'; | ||
|
||
export function PreWrap(props: PropsWithChildren) { | ||
return <Box style={{ whiteSpace: 'pre-wrap' }}>{props.children}</Box>; | ||
} |