docs: expanded rating form + UI docs improvement (#5211)

* docs: expanded rating form + UI docs improvement

* added props table + changed example
This commit is contained in:
Shahed Nasser
2023-09-26 20:26:09 +03:00
committed by GitHub
parent dee3419fe8
commit 987dd8f568
15 changed files with 285 additions and 86 deletions
@@ -122,10 +122,12 @@ export const NotificationProvider = ({
)
}
export const useNotifications = (): NotificationContextType => {
export const useNotifications = (
suppressError?: boolean
): NotificationContextType | null => {
const context = useContext(NotificationContext)
if (!context) {
if (!context && !suppressError) {
throw new Error(
"useNotifications must be used within a NotificationProvider"
)