UNPKG

@olleemilsson/flowbite-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"> <

11 lines (10 loc) 575 B
import { jsx as _jsx } from "react/jsx-runtime"; import classNames from 'classnames'; import { HiStar } from 'react-icons/hi'; import { useTheme } from '../Flowbite/ThemeContext'; import { useRatingContext } from './RatingContext'; export const RatingStar = ({ filled = true, starIcon: Icon = HiStar, className }) => { const { size = 'sm' } = useRatingContext(); const theme = useTheme().theme.rating.star; return (_jsx(Icon, { className: classNames(theme.sizes[size], theme[filled ? 'filled' : 'empty'], className), "data-testid": "flowbite-rating-star" })); };