Skip to content

Commit

Permalink
A few more renames
Browse files Browse the repository at this point in the history
  • Loading branch information
BPScott committed Aug 30, 2019
1 parent 133e050 commit b4eb1f7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/components/Navigation/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export {Navigation, NavigationProps} from './Navigation';

export {
ItemProps,
ItemProps as NavigationItemProps,
SubNavigationItem,
isNavigationItemActive,
MessageProps,
MessageProps as NavigationMessageProps,
} from './components';
4 changes: 2 additions & 2 deletions src/components/ResourceItem/ResourceItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import {
ResourceListContext,
SELECT_ALL_ITEMS,
SelectedItems,
ResourceListSelectedItems,
} from '../../utilities/resource-list';
import styles from './ResourceItem.scss';

Expand Down Expand Up @@ -428,7 +428,7 @@ function stopPropagation(event: React.MouseEvent<any>) {
event.stopPropagation();
}

function isSelected(id: string, selectedItems?: SelectedItems) {
function isSelected(id: string, selectedItems?: ResourceListSelectedItems) {
return Boolean(
selectedItems &&
((Array.isArray(selectedItems) && selectedItems.includes(id)) ||
Expand Down
6 changes: 3 additions & 3 deletions src/components/ResourceList/ResourceList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '../../utilities/with-app-provider';
import {
ResourceListContext,
SelectedItems,
ResourceListSelectedItems,
SELECT_ALL_ITEMS,
} from '../../utilities/resource-list';
import {Select, SelectOption} from '../Select';
Expand Down Expand Up @@ -58,7 +58,7 @@ export interface ResourceListProps {
/** Actions available on the currently selected items */
bulkActions?: BulkActionsProps['actions'];
/** Collection of IDs for the currently selected items */
selectedItems?: SelectedItems;
selectedItems?: ResourceListSelectedItems;
/** Renders a Select All button at the top of the list and checkboxes in front of each list item. For use when bulkActions aren't provided. **/
selectable?: boolean;
/** If there are more items than currently in the list */
Expand All @@ -76,7 +76,7 @@ export interface ResourceListProps {
/** Callback when sort option is changed */
onSortChange?(selected: string, id: string): void;
/** Callback when selection is changed */
onSelectionChange?(selectedItems: SelectedItems): void;
onSelectionChange?(selectedItems: ResourceListSelectedItems): void;
/** Function to render each list item */
renderItem(item: any, id: string, index: number): React.ReactNode;
/** Function to customize the unique ID for each item */
Expand Down
8 changes: 3 additions & 5 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export {Modal, ModalProps} from './Modal';
export {
Navigation,
NavigationProps,
ItemProps as NavigationItemProps,
MessageProps as NavigationMessageProps,
NavigationItemProps,
NavigationMessageProps,
SubNavigationItem,
isNavigationItemActive,
} from './Navigation';
Expand Down Expand Up @@ -177,9 +177,7 @@ export {
FilterTextField,
} from './ResourceList';

export {
SelectedItems as ResourceListSelectedItems,
} from '../utilities/resource-list';
export {ResourceListSelectedItems} from '../utilities/resource-list';

export {ResourcePicker, ResourcePickerProps} from './ResourcePicker';

Expand Down
4 changes: 2 additions & 2 deletions src/utilities/resource-list/context.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import {SelectedItems} from './types';
import {ResourceListSelectedItems} from './types';

export interface ResourceListContextType {
selectMode?: boolean;
selectable?: boolean;
selectedItems?: SelectedItems;
selectedItems?: ResourceListSelectedItems;
resourceName?: {
singular: string;
plural: string;
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/resource-list/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export {ResourceListContext} from './context';

export {SelectedItems, SELECT_ALL_ITEMS} from './types';
export {ResourceListSelectedItems, SELECT_ALL_ITEMS} from './types';
2 changes: 1 addition & 1 deletion src/utilities/resource-list/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type SelectedItems = string[] | 'All';
export type ResourceListSelectedItems = string[] | 'All';

export const SELECT_ALL_ITEMS = 'All';

0 comments on commit b4eb1f7

Please sign in to comment.