-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plasma-new-hope): draft rating api
- Loading branch information
1 parent
1fb7a93
commit e6a50a6
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
packages/plasma-new-hope/src/components/Rating/Rating.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import type { HTMLAttributes, ReactNode } from 'react'; | ||
|
||
export type RatingProps = { | ||
/** | ||
* Отображаемое числовое значение. | ||
*/ | ||
value?: number; | ||
/** | ||
* Положение числа до или после звезд. | ||
* @default 'before' | ||
*/ | ||
valuePlacement?: 'before' | 'after'; | ||
/** | ||
* Слот для иконки, вместо иконки `звезды` по умолчанию. | ||
*/ | ||
starSlot?: ReactNode; | ||
/** | ||
* Отобразить звезды. | ||
* @default true | ||
*/ | ||
hasStars?: boolean; | ||
/** | ||
* Количество звезд. | ||
* @default 5 | ||
*/ | ||
starQuantity?: 1 | 5 | 10; | ||
/** | ||
* Положение звезд. | ||
* @default 'before' | ||
*/ | ||
starPlacement?: 'before' | 'after'; | ||
/** | ||
* Вспомогательный текст снизу слева. | ||
*/ | ||
helperText?: string; | ||
/** | ||
* Размер компонента. | ||
*/ | ||
size?: string; | ||
/** | ||
* Вид компонента. | ||
*/ | ||
view?: string; | ||
} & HTMLAttributes<HTMLDivElement>; |