import React from 'react'; import { MediaListRow } from './MediaListRow'; import { BulkActionsDropdown } from './BulkActionsDropdown'; import { SelectAllCheckbox } from './SelectAllCheckbox'; import { CircleIconButton, MaterialIcon } from './_shared'; import { LinksConsumer } from '../utils/contexts'; import { translateString } from '../utils/helpers/'; import './MediaListWrapper.scss'; interface MediaListWrapperProps { title?: string; viewAllLink?: string; viewAllText?: string; className?: string; style?: { [key: string]: any }; children?: any; showBulkActions?: boolean; selectedCount?: number; totalCount?: number; onBulkAction?: (action: string) => void; onSelectAll?: () => void; onDeselectAll?: () => void; showAddMediaButton?: boolean; } export const MediaListWrapper: React.FC = ({ title, viewAllLink, viewAllText, className, style, children, showBulkActions = false, selectedCount = 0, totalCount = 0, onBulkAction = () => {}, onSelectAll = () => {}, onDeselectAll = () => {}, showAddMediaButton = false, }) => (
{showBulkActions && ( {(links) => (
{showAddMediaButton && ( )}
)}
)} {children || null}
);