From 30a25a89c91aee015ab516c7bc48cc7ed65c8297 Mon Sep 17 00:00:00 2001 From: John Victor Date: Thu, 18 Feb 2021 15:48:00 -0300 Subject: [PATCH 1/2] Add style prop to ToastContainer Props in type declarations file --- index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index e3f07fb..1a2a0ea 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -import { ReactNode, ComponentType } from 'react'; +import { ReactNode, ComponentType, CSSProperties } from 'react'; export type AppearanceTypes = 'error' | 'info' | 'success' | 'warning'; @@ -37,6 +37,7 @@ export interface ToastConsumerProps { export interface ToastContainerProps { children: ReactNode; className?: string; + style?: CSSProperties; hasToasts: boolean; placement: Placement; } From 2dc12bd3a6935104b3b00f47f5df76e5b71397b3 Mon Sep 17 00:00:00 2001 From: John Victor Date: Thu, 18 Feb 2021 16:07:32 -0300 Subject: [PATCH 2/2] Extend Toast Container Props from base div element props --- index.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 1a2a0ea..43cd0f6 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,4 +1,4 @@ -import { ReactNode, ComponentType, CSSProperties } from 'react'; +import { ReactNode, ComponentType, DetailedHTMLProps, HTMLAttributes } from 'react'; export type AppearanceTypes = 'error' | 'info' | 'success' | 'warning'; @@ -34,10 +34,9 @@ export interface ToastConsumerProps { children: (context: ToastConsumerContext) => ReactNode; } -export interface ToastContainerProps { +export interface ToastContainerProps extends DetailedHTMLProps, HTMLDivElement> { children: ReactNode; className?: string; - style?: CSSProperties; hasToasts: boolean; placement: Placement; }