From d347a702313bcfb6d7b1c45548f8873f22e3ecef Mon Sep 17 00:00:00 2001 From: Cheton Wu Date: Mon, 11 Nov 2024 17:47:37 +0800 Subject: [PATCH 1/3] chore: add changeset for PR #940 --- .changeset/tonic-ui-933.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/tonic-ui-933.md diff --git a/.changeset/tonic-ui-933.md b/.changeset/tonic-ui-933.md new file mode 100644 index 0000000000..05f13fbfe5 --- /dev/null +++ b/.changeset/tonic-ui-933.md @@ -0,0 +1,5 @@ +--- +"@tonic-ui/react": minor +--- + +feat(react/toast): enhance inline toast transition management From 5ed8f6845644518ea3dd87f997ce182749063608 Mon Sep 17 00:00:00 2001 From: Cheton Wu Date: Mon, 11 Nov 2024 18:11:03 +0800 Subject: [PATCH 2/3] docs: clean up theme configuration --- packages/react-docs/pages/_app.page.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/react-docs/pages/_app.page.js b/packages/react-docs/pages/_app.page.js index f82d399f56..20a615e877 100644 --- a/packages/react-docs/pages/_app.page.js +++ b/packages/react-docs/pages/_app.page.js @@ -33,22 +33,6 @@ const NONCE = ensureString(process.env.NONCE); // Algolia search client const searchClient = algoliasearch(process.env.ALGOLIA_APPLICATION_ID, process.env.ALGOLIA_SEARCH_API_KEY); -theme.components = { - // Set default props for components here. - // - // Example: - // ``` - // 'AccordionToggle': { - // defaultProps: { - // disabled: true, - // }, - // } - // ``` -}; - -// Enable CSS variables replacement -theme.config.useCSSVariables = true; - const EmotionCacheProvider = ({ children, nonce, From 653d905c8fb7cbf287289c81e8a0cc9060a14eca Mon Sep 17 00:00:00 2001 From: Cheton Wu Date: Mon, 11 Nov 2024 18:15:20 +0800 Subject: [PATCH 3/3] revert: remove `ToastContainerComponent` and `ToastContainerProps` props --- packages/react/src/toast/ToastManager.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/react/src/toast/ToastManager.js b/packages/react/src/toast/ToastManager.js index cc4f82042a..cf84222556 100644 --- a/packages/react/src/toast/ToastManager.js +++ b/packages/react/src/toast/ToastManager.js @@ -41,8 +41,6 @@ const getToastPlacementByState = (state, id) => { const ToastManager = (inProps) => { const { - ToastContainerComponent = ToastContainer, - ToastContainerProps, TransitionComponent = ToastTransition, TransitionProps, children, @@ -224,10 +222,9 @@ const ToastManager = (inProps) => { {Object.keys(state).map((placement) => { const toasts = ensureArray(state[placement]).filter(toast => !isNullish(toast)); return ( - {toasts.map((toast) => { @@ -254,7 +251,7 @@ const ToastManager = (inProps) => { ); })} - + ); })}