Skip to content

Commit

Permalink
make viewtype optionmal
Browse files Browse the repository at this point in the history
  • Loading branch information
amcdnl committed Jul 26, 2024
1 parent 1533fd1 commit 3ad5646
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Sessions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { SessionsContext } from './SessionsContext';
import { PluggableList } from 'react-markdown/lib';

export interface SessionsProps extends PropsWithChildren {
children?: ReactNode;
/**
* The style to apply to the root element.
*/
Expand All @@ -32,7 +31,7 @@ export interface SessionsProps extends PropsWithChildren {
* meant to be displayed alongside other content. Full prompts are larger
* and are meant to be displayed on their own.
*/
viewType: 'companion' | 'console';
viewType?: 'companion' | 'console';

/**
* The list of allowed file types. If null or not defined, not file upload
Expand Down
3 changes: 1 addition & 2 deletions stories/Demos.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export const Console = () => {
<Sessions
sessions={fakeSessions}
viewType="console"
isLoading={false}
onDeleteSession={() => alert('delete!')}
>
<SessionsList>
Expand Down Expand Up @@ -141,7 +140,7 @@ export const CustomComponents = () => {
borderRadius: 5
}}
>
<Sessions sessions={fakeSessions} viewType="console">
<Sessions sessions={fakeSessions}>
<SessionsList>
<NewSessionButton />
<Divider />
Expand Down

0 comments on commit 3ad5646

Please sign in to comment.