Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
HBS999 committed Nov 12, 2024
1 parent ba82c02 commit 19972a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
10 changes: 1 addition & 9 deletions apps/docs/src/examples/rating-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,7 @@ export function HalfRatingsExample() {
{(_) => (
<RatingGroup.Item class={style["rating-group-item"]}>
<RatingGroup.ItemControl>
{(state) =>
state.half() ? (
<StarHalfIcon />
) : state.highlighted() ? (
<StarIcon />
) : (
<StarIcon />
)
}
{(state) => (state.half() ? <StarHalfIcon /> : <StarIcon />)}
</RatingGroup.ItemControl>
</RatingGroup.Item>
)}
Expand Down
6 changes: 2 additions & 4 deletions apps/docs/src/routes/docs/core/components/rating-group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ Allow 0.5 value steps by setting the `allowHalf` prop to true.
{_ => (
<RatingGroup.Item>
<RatingGroup.ItemControl>
{state =>
state.half() ? <StarHalfIcon /> : state.highlighted() ? <StarIcon /> : <StarIcon />
}
{(state) => (state.half() ? <StarHalfIcon /> : <StarIcon />)}
</RatingGroup.ItemControl>
</RatingGroup.Item>
)}
Expand Down Expand Up @@ -344,7 +342,7 @@ function HTMLFormExample() {

### RatingGroup

`RatingGroup` is equivalent to the `Root` import from `@kobalte/core/Rating-group`.
`RatingGroup` is equivalent to the `Root` import from `@kobalte/core/rating-group`.

| Prop | Description |
| :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down

0 comments on commit 19972a2

Please sign in to comment.