-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): re-naming GroupChannelInfo to GroupChannelSettings
- Loading branch information
Showing
19 changed files
with
148 additions
and
142 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
packages/uikit-react-native-core/src/domain/groupChannelInfo/index.ts
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
...kit-react-native-core/src/domain/groupChannelInfo/module/createGroupChannelInfoModule.tsx
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
packages/uikit-react-native-core/src/domain/groupChannelInfo/types.ts
This file was deleted.
Oops, something went wrong.
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
4 changes: 4 additions & 0 deletions
4
packages/uikit-react-native-core/src/domain/groupChannelSettings/index.ts
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,4 @@ | ||
export { default as GroupChannelSettingsHeader } from './component/GroupChannelSettingsHeader'; | ||
export { default as GroupChannelSettingsView } from './component/GroupChannelSettingsView'; | ||
export { default as createGroupChannelSettingsModule } from './module/createGroupChannelSettingsModule'; | ||
export { GroupChannelSettingsContextProvider, GroupChannelSettingsContext } from './module/moduleContext'; |
15 changes: 15 additions & 0 deletions
15
...t-native-core/src/domain/groupChannelSettings/module/createGroupChannelSettingsModule.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,15 @@ | ||
import GroupChannelSettingsHeader from '../component/GroupChannelSettingsHeader'; | ||
import GroupChannelSettingsView from '../component/GroupChannelSettingsView'; | ||
import type { GroupChannelSettingsModule } from '../types'; | ||
import { GroupChannelSettingsContextProvider } from './moduleContext'; | ||
|
||
const createGroupChannelSettingsModule = ({ | ||
Header = GroupChannelSettingsHeader, | ||
View = GroupChannelSettingsView, | ||
Provider = GroupChannelSettingsContextProvider, | ||
...module | ||
}: Partial<GroupChannelSettingsModule> = {}): GroupChannelSettingsModule => { | ||
return { Header, View, Provider, ...module }; | ||
}; | ||
|
||
export default createGroupChannelSettingsModule; |
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
48 changes: 48 additions & 0 deletions
48
packages/uikit-react-native-core/src/domain/groupChannelSettings/types.ts
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,48 @@ | ||
import type React from 'react'; | ||
import type Sendbird from 'sendbird'; | ||
|
||
import type { BaseHeaderProps } from '@sendbird/uikit-react-native-foundation'; | ||
|
||
import type { CommonComponent } from '../../types'; | ||
|
||
export type GroupChannelSettingsProps = { | ||
Fragment: { | ||
staleChannel: GroupChannelSettingsProps['Provider']['staleChannel']; | ||
Header?: GroupChannelSettingsProps['Header']['Header']; | ||
onPressHeaderLeft: GroupChannelSettingsProps['Header']['onPressHeaderLeft']; | ||
onPressMenuMembers: GroupChannelSettingsProps['View']['onPressMenuMembers']; | ||
onLeaveChannel: GroupChannelSettingsProps['View']['onLeaveChannel']; | ||
}; | ||
Header: { | ||
Header?: null | CommonComponent<BaseHeaderProps<{ title: string; onPressLeft: () => void }>>; | ||
onPressHeaderLeft: () => void; | ||
}; | ||
View: { | ||
onPressMenuMembers: () => void; | ||
onLeaveChannel: () => void; | ||
}; | ||
Provider: { | ||
staleChannel: Sendbird.GroupChannel; | ||
}; | ||
}; | ||
|
||
/** | ||
* Internal context for GroupChannelSettings | ||
* For example, the developer can create a custom header | ||
* with getting data from the domain context | ||
* */ | ||
export type GroupChannelSettingsContextType = { | ||
Fragment: React.Context<{ | ||
channel: Sendbird.GroupChannel; | ||
headerTitle: string; | ||
headerRight: string; | ||
onPressHeaderRight: () => void; | ||
}>; | ||
}; | ||
export interface GroupChannelSettingsModule { | ||
Provider: React.FC<GroupChannelSettingsProps['Provider']>; | ||
Header: CommonComponent<GroupChannelSettingsProps['Header']>; | ||
View: CommonComponent<GroupChannelSettingsProps['View']>; | ||
} | ||
|
||
export type GroupChannelSettingsFragment = React.FC<GroupChannelSettingsProps['Fragment']>; |
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
Oops, something went wrong.