Skip to content

Commit

Permalink
chore(html): add grid-normal template
Browse files Browse the repository at this point in the history
  • Loading branch information
epetrow committed Jan 29, 2024
1 parent e457fb8 commit a60b0ef
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/html/src/grid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export * from './grid-footer.spec';
export * from './grid-footer-table.spec';
export * from './grid-pager.spec';
export * from './grid-toolbar.spec';
export * from './templates/grid-normal';
80 changes: 80 additions & 0 deletions packages/html/src/grid/templates/grid-normal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { Grid, GridHeader, GridGroupingHeader ,GridContainer, GridContent, GridHeaderTable, GridHeaderCell, GridTable, GridPager } from '../../grid';
import { TableThead, TableTbody, TableRow, TableTd } from '../../table';

export const GridNormal = (props) => (
<Grid _renderAriaRoot
pager={( <GridPager /> )}
groupingHeader={(
<GridGroupingHeader dropHint="Drag a column header and drop it here to group by that column" />
)}
children={(
<>
<GridHeader>
<div className="k-grid-header-wrap">
<GridHeaderTable>
<colgroup>
<col style={{ width: "240px" }} />
<col />
<col />
<col style={{ width: "150px" }} />
</colgroup>
<TableThead>
<TableRow>
<GridHeaderCell columnTitle="Contact Name" />
<GridHeaderCell columnTitle="Contact Title" />
<GridHeaderCell columnTitle="Company Name" />
<GridHeaderCell columnTitle="Country" />
</TableRow>
</TableThead>
</GridHeaderTable>
</div>
</GridHeader>
<GridContainer>
<GridContent>
<GridTable>
<colgroup>
<col style={{ width: "240px" }} />
<col />
<col />
<col style={{ width: "150px" }} />
</colgroup>
<TableTbody>
<TableRow>
<TableTd>Maria Anders</TableTd>
<TableTd>Sales Representative</TableTd>
<TableTd>Alfreds Futterkiste</TableTd>
<TableTd>Germany</TableTd>
</TableRow>
<TableRow className="k-alt" alt>
<TableTd>Ana Trujillo</TableTd>
<TableTd>Owner</TableTd>
<TableTd>Anna Trujillo Emparedados y helados</TableTd>
<TableTd>Mexico</TableTd>
</TableRow>
<TableRow>
<TableTd>Thomas Hardy</TableTd>
<TableTd>Sales Representative</TableTd>
<TableTd>Around the Horn</TableTd>
<TableTd>UK</TableTd>
</TableRow>
<TableRow className="k-alt" alt>
<TableTd>Christina Berglund</TableTd>
<TableTd>Office Administrator</TableTd>
<TableTd>Berglunds snabbköp</TableTd>
<TableTd>Sweden</TableTd>
</TableRow>
<TableRow>
<TableTd>Martin Sommer</TableTd>
<TableTd>Owner</TableTd>
<TableTd>Bólido Comidas preparadas</TableTd>
<TableTd>Spain</TableTd>
</TableRow>
</TableTbody>
</GridTable>
</GridContent>
</GridContainer>
</>
)}
{...props}>
</Grid>
);

0 comments on commit a60b0ef

Please sign in to comment.