Skip to content

Commit

Permalink
feat(Grid): add patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-kumawat committed Aug 21, 2020
1 parent 6ff117f commit 8afac37
Show file tree
Hide file tree
Showing 6 changed files with 950 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ addDecorator(withA11y);
addDecorator(CenterDecorator);
addDecorator(withInfo(infoOptions));

configure(require.context('../core/components', true, /\.story\.(js|tsx)$/), module);
configure(require.context('../core/components', true, /\.story\.(jsx|tsx)$/), module);
6 changes: 3 additions & 3 deletions core/components/organisms/grid/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export interface ExternalHeaderProps {
export type updateSearchTermFunction = (newSearchTerm: string) => void;

export interface HeaderProps extends ExternalHeaderProps {
loading: boolean;
error: boolean;
loading?: boolean;
error?: boolean;
data: Data;
schema: Schema;
selectAll?: GridProps['selectAll'];
totalRecords?: number;
totalRecords: number;
withPagination?: boolean;
withCheckbox?: boolean;
showHead?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
.Table-container {
display: flex;
height: 100%;
/* overflow: hidden; */
}

.Table-filters {
box-sizing: border-box;
display: flex;
flex-shrink: 0;
/* background: var(--secondary); */
}

.Table-filters--vertical {
flex-direction: column;
height: 100%;
width: var(--spacing-9);
padding: 0 var(--spacing-l);
}

.Table-filtersHeading {
display: flex;
align-items: center;
justify-content: space-between;
}

.Table-filtersCloseIcon {
cursor: pointer;
}

.Table-filters--vertical .Table-filter {
padding: var(--spacing) 0;
}

.Table-filters--vertical .Table-filter:first-of-type {
padding-top: var(--spacing-l);
}

.Table-filters--vertical .Table-filter:last-of-type {
padding-bottom: var(--spacing-l);
}

.Table-filters--horizontal .Table-filter {
padding: 0 var(--spacing-m);
}

.Table-filters--horizontal .Table-filter:first-of-type {
padding-left: 0;
}

.Table-filters--horizontal .Table-filter:last-of-type {
padding-right: 0;
}

.Table-filter .Input {
min-width: unset;
}
Loading

0 comments on commit 8afac37

Please sign in to comment.