UNPKG

hoda-react

Version:

<div align="center"> <h1>:construction: flowbite-react (unreleased) :construction:</h1> <p> <a href="https://flowbite-react.com"> <img alt="Flowbite - Tailwind CSS components" width="350" src=".github/assets/flowbite-react-github.png"> <

10 lines (9 loc) 957 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import classNames from 'classnames'; import { useTheme } from '../Flowbite'; import { useTimelineContext } from './TimelineContext'; export const TimelinePoint = ({ children, className, icon: Icon, ...props }) => { const theme = useTheme().theme.timeline.item.point; const { horizontal } = useTimelineContext(); return (_jsxs("div", { "data-testid": "timeline-point", className: classNames(horizontal && theme.base.horizontal, !horizontal && theme.base.vertical, className), ...props, children: [children, Icon ? (_jsx("span", { className: classNames(theme.marker.icon.wrapper), children: _jsx(Icon, { "aria-hidden": true, className: classNames(theme.marker.icon.base) }) })) : (_jsx("div", { className: classNames(horizontal && theme.marker.base.horizontal, !horizontal && theme.marker.base.vertical) })), horizontal && _jsx("div", { className: classNames(theme.line) })] })); };