mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added a prop for enabling horizontal scroll
refs PROD-332
This commit is contained in:
parent
e2a4724792
commit
7d9dfac489
1 changed files with 3 additions and 1 deletions
|
@ -28,6 +28,7 @@ export interface TableProps {
|
|||
pagination?: PaginationData;
|
||||
showMore?: ShowMoreData;
|
||||
fillContainer?: boolean;
|
||||
horizontalScroll?: boolean;
|
||||
paddingXClassName?: string;
|
||||
}
|
||||
|
||||
|
@ -65,6 +66,7 @@ const Table: React.FC<TableProps> = ({
|
|||
showMore,
|
||||
isLoading,
|
||||
fillContainer = false,
|
||||
horizontalScroll = false,
|
||||
paddingXClassName
|
||||
}) => {
|
||||
const table = React.useRef<HTMLTableSectionElement>(null);
|
||||
|
@ -145,7 +147,7 @@ const Table: React.FC<TableProps> = ({
|
|||
);
|
||||
|
||||
const mainContainerClasses = clsx(
|
||||
'overflow-x-auto',
|
||||
horizontalScroll ? 'overflow-x-auto' : '',
|
||||
fillContainer ? 'absolute inset-0 min-w-full' : 'w-full'
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue