Skip to content

Commit

Permalink
Add compressed props on basic/memory tables
Browse files Browse the repository at this point in the history
  • Loading branch information
snide committed Apr 18, 2018
1 parent e8f7c05 commit a8620ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src-docs/src/views/tables/basic/props_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export const propsInfo = {
required: true,
type: { name: 'object[]' }
},
compressed: {
description: 'Makes the font and padding smaller for the entire table',
type: { name: 'bool' }
},
columns: {
description: 'Defines the table columns',
required: true,
Expand Down
3 changes: 2 additions & 1 deletion src/components/basic_table/basic_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ const BasicTablePropTypes = {
error: PropTypes.string,
loading: PropTypes.bool,
noItemsMessage: PropTypes.node,
className: PropTypes.string
className: PropTypes.string,
compressed: PropTypes.bool,
};

export class EuiBasicTable extends Component {
Expand Down
3 changes: 3 additions & 0 deletions src/components/basic_table/in_memory_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const InMemoryTablePropTypes = {
loading: PropTypes.bool,
message: PropTypes.node,
error: PropTypes.string,
compressed: PropTypes.bool,
search: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
defaultQuery: QueryType,
box: PropTypes.shape({
Expand Down Expand Up @@ -255,6 +256,7 @@ export class EuiInMemoryTable extends Component {
selection,
isSelectable,
hasActions,
compressed,
pagination: hasPagination,
sorting: hasSorting,
} = this.props;
Expand Down Expand Up @@ -302,6 +304,7 @@ export class EuiInMemoryTable extends Component {
error={error}
loading={loading}
noItemsMessage={message}
compressed={compressed}
/>
);

Expand Down

0 comments on commit a8620ec

Please sign in to comment.