/** * A collection of popular layouts and patterns made with CSS (https://csslayout.io) * (c) 2019 - 2021 Nguyen Huu Phuoc */ import * as React from 'react'; import { Helmet } from 'react-helmet'; import Pattern from '../../constants/Pattern'; import DetailsLayout from '../../layouts/DetailsLayout'; import BrowserFrame from '../../placeholders/BrowserFrame'; interface DotProps { index: number; } const Details: React.FC<{}> = () => { const [activeItem, setActiveItem] = React.useState(0); const Dot: React.FC = ({ index }) => { const isActive = index === activeItem; const click = () => setActiveItem(index); return (
  • ); }; return (
  • ... `} css={` .dots { /* Center the content */ align-items: center; display: flex; justify-content: center; /* Reset styles */ list-style-type: none; margin: 0; padding: 0; } .dots__item { /* Rounded border */ border-radius: 9999px; height: 12px; width: 12px; /* Active dot */ background-color: rgba(0, 0, 0, .3); /* Inactive dot */ background-color: transparent; border: 1px solid rgba(0, 0, 0, .3); /* OPTIONAL: Spacing between dots */ margin: 0 4px; } `} >
    ); }; export default Details;