mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-08-11 16:44:57 +02:00
Add rating
This commit is contained in:
17
client/patterns/rating/Star.tsx
Normal file
17
client/patterns/rating/Star.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from 'react';
|
||||
|
||||
import './star.css';
|
||||
|
||||
interface StarProps {
|
||||
isActive: boolean;
|
||||
}
|
||||
|
||||
const Star: React.FC<StarProps> = ({ isActive }) => {
|
||||
return (
|
||||
<button className="star">
|
||||
{isActive ? '★' : '☆'}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export default Star;
|
Reference in New Issue
Block a user