Skip to content

Commit

Permalink
fix(docs): add horizontal overflow scrollbar to props table.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed Jan 28, 2021
1 parent a374afd commit 6cd885a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/docs/components/layout/mdx-provider-components.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import { Title, Card, CardBody } from '@patternfly/react-core';
import { createUseStyles } from 'react-jss';
import classnames from 'classnames';

const useTableStyles = createUseStyles({
card: {
overflowY: 'auto'
}
});

const H1 = ({ className, ...props }) => <Title className="pf-u-mb-lg" headingLevel="h1" {...props} />;
const H2 = ({ className, ...props }) => <Title className="pf-u-mb-lg" headingLevel="h2" {...props} />;
const H3 = ({ className, ...props }) => <Title className="pf-u-mb-lg" headingLevel="h2" {...props} />;
const Table = props => <Card className="pf-u-mb-lg"><CardBody><table className="pf-c-table pf-m-grid-md" {...props} /></CardBody></Card>;
const Table = props => {
const classes = useTableStyles();
return <Card className={classnames('pf-u-mb-lg', classes.card)}><CardBody><table className="pf-c-table pf-m-grid-md" {...props} /></CardBody></Card>;
};

const components = {
h1: H1,
Expand Down

0 comments on commit 6cd885a

Please sign in to comment.