Skip to content

Commit

Permalink
fix(DatatableV2): fix pagination display in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkl2533 committed Jul 12, 2024
1 parent 5254e43 commit 7b2e6db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 17 additions & 9 deletions src/components/DatatableV2/toolbar/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,23 @@ import { Inline, Padbox } from '../../layout';
import IconButton from '../buttons/IconButton';
import { DatatableInstance } from '../Datatable.types';

const cq = {
sm: {
maxWidth: 512,
},
md: {
minWidth: 513,
maxWidth: 720,
},
};
/**
* THIS IS A QUICK FIX
* We need to replace the `react-container-query` with CSS based container queries
*/
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const cq = window?.__STORYBOOK_PREVIEW__ // eslint-disable-line no-underscore-dangle
? { sm: { maxWidth: 0 } }
: {
sm: {
maxWidth: 512,
},
md: {
minWidth: 513,
maxWidth: 720,
},
};

const Select = styled.select`
border: 1px solid ${getFormStyle('borderColor')};
Expand Down

0 comments on commit 7b2e6db

Please sign in to comment.