dooboo-ui-legacy
dooboo-ui-legacy copied to clipboard
[Rating] Customize image
Is your feature request related to a problem? Please describe.
We want to use custom image for Rating instead of the default start image.
Describe the solution you'd like A clear and concise description of what you want to happen.
The Rating component could show the images from a image property.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
interface StarProps {
key: number;
isOn: boolean;
onPress: () => void;
disabled?: boolean;
customItem?: CustomItem;
}
interface CustomItem {
onComponent: React.ReactElement;
offComponent: React.ReactElement;
}
<Rating
total={number('total', 5)}
value={value}
onChange={handleChange}
disabled={disabled}
customItem={
onComponent: ...,
offComponent: ...,
}
/>
Additional context Add any other context or screenshots about the feature request here.