Skip to content

Commit

Permalink
feat: switch ladle to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
petyosi committed Aug 5, 2022
1 parent e731b67 commit ecd1cc6
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions .ladle/components.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { GlobalProvider } from '@ladle/react';
import React from 'react';

import '@stream-io/stream-chat-css/dist/v2/css/index.css';
import './styles.css';

// https://ladle.dev/docs/providers
Expand Down
9 changes: 9 additions & 0 deletions .ladle/styles.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
.ladle-main {
padding: 0 1rem 3rem;
}

.chat-wrapper {
display: flex;
flex-direction: row;
}

.str-chat {
height: 700px !important;
}
.str-chat-channel {
flex-grow: 1;
}

.str-chat-channel-list {
overflow: auto;
Expand Down
1 change: 0 additions & 1 deletion src/stories/add-message.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import '@stream-io/stream-chat-css/dist/css/index.css';
import React from 'react';
import type { ChannelSort } from 'stream-chat';
import {
Expand Down
1 change: 0 additions & 1 deletion src/stories/edit-message.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@stream-io/stream-chat-css/dist/css/index.css';
import React from 'react';
import type { ChannelSort } from 'stream-chat';
import {
Expand Down
1 change: 0 additions & 1 deletion src/stories/hello.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import '@stream-io/stream-chat-css/dist/css/index.css';
import React from 'react';
import type { ChannelFilters, ChannelOptions, ChannelSort } from 'stream-chat';
import {
Expand Down
1 change: 0 additions & 1 deletion src/stories/jump-to-message.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
VirtualizedMessageList,
Window,
} from '../index';
import '@stream-io/stream-chat-css/dist/css/index.css';
import { ConnectedUser } from './utils';

void MessageList;
Expand Down
1 change: 0 additions & 1 deletion src/stories/mark-read.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import '@stream-io/stream-chat-css/dist/css/index.css';
import React from 'react';
import type { ChannelSort } from 'stream-chat';
import { nanoid } from 'nanoid';
Expand Down
1 change: 0 additions & 1 deletion src/stories/message-status-readby-tooltip.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import '@stream-io/stream-chat-css/dist/css/index.css';
import React, { useCallback } from 'react';
import type { ChannelSort } from 'stream-chat';
import {
Expand Down
1 change: 0 additions & 1 deletion src/stories/navigate-long-message-lists.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import '@stream-io/stream-chat-css/dist/css/index.css';
import React, { useEffect } from 'react';
import type { ChannelSort } from 'stream-chat';
import {
Expand Down
1 change: 0 additions & 1 deletion src/stories/toggle-message-actions.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
Thread,
Window,
} from '../components';
import '@stream-io/stream-chat-css/dist/css/index.css';

const allActions = Object.keys(MESSAGE_ACTIONS);
const WrappedConnectedUser = ({ token, userId }: Omit<ConnectedUserProps, 'children'>) => {
Expand Down
4 changes: 3 additions & 1 deletion src/stories/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ export const ConnectedUser = <SCG extends DefaultGenerics = StreamChatGenerics>(
return (
<>
<h3>User: {userId}</h3>
<Chat client={client}>{children}</Chat>
<div className='chat-wrapper'>
<Chat client={client}>{children}</Chat>
</div>
</>
);
};

0 comments on commit ecd1cc6

Please sign in to comment.