import * as React from 'react'; import Head from 'next/head'; import { Spacer } from '@1milligram/design'; import { RelatedPatterns } from '../../components/RelatedPatterns'; import { Pattern } from '../../constants/Pattern'; import { PatternLayout } from '../../layouts/PatternLayout'; import Block from '../../placeholders/Block'; import BrowserFrame from '../../placeholders/BrowserFrame'; import Rectangle from '../../placeholders/Rectangle'; const Details: React.FC<{}> = () => { return (
Try to scroll the main content of table to see the header sticks to the top.
... `} css={` .header { /* Background color */ background-color: #ddd; /* Stick to the top */ position: sticky; top: 0; /* Displayed on top of other rows when scrolling */ z-index: 9999; } `} >
{Array(3) .fill(0) .map((_, index) => { return ( ); })} {Array(10) .fill(0) .map((_, row) => { return ( {Array(3) .fill(0) .map((__, col) => { return ( ); })} ); })}
); }; export default Details;