Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add changeset for PR #940 #941

Merged
merged 3 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tonic-ui-933.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tonic-ui/react": minor
---

feat(react/toast): enhance inline toast transition management
16 changes: 0 additions & 16 deletions packages/react-docs/pages/_app.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 2 additions & 5 deletions packages/react/src/toast/ToastManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ const getToastPlacementByState = (state, id) => {

const ToastManager = (inProps) => {
const {
ToastContainerComponent = ToastContainer,
ToastContainerProps,
TransitionComponent = ToastTransition,
TransitionProps,
children,
Expand Down Expand Up @@ -224,10 +222,9 @@ const ToastManager = (inProps) => {
{Object.keys(state).map((placement) => {
const toasts = ensureArray(state[placement]).filter(toast => !isNullish(toast));
return (
<ToastContainerComponent
<ToastContainer
key={placement}
placement={placement}
{...ToastContainerProps}
>
<ToastTransitionGroup>
{toasts.map((toast) => {
Expand All @@ -254,7 +251,7 @@ const ToastManager = (inProps) => {
);
})}
</ToastTransitionGroup>
</ToastContainerComponent>
</ToastContainer>
);
})}
</Portal>
Expand Down
Loading