fkhadra / fkhadra/react-toastify

feature/bug: Enable variable/dynamic width stacked notifications

Open
#1,249 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
13.4k
Forks
741
PR merge metrics
No merged PRs in 30d

Description

Setting the following css enables variable/dynamic width notifications when stacked={false}
```
'.Toastify__toast': {
padding: 0,
width: 'fit-content',
},
'.Toastify__toast-body': {
padding: 0,
margin: 0,
width: '100%',
},
```
When I set stacked={true} this no longer works and the notifications are all set to a fixed small width causing all the notifications to run off the screen. Maybe it makes sensed for stacked notifications to all be the same width (visually), but would be interested in seeing if there are ideas for how it could be accomplished with variable/dynamic width.

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported CSS behavior with stacked={false} and stacked={true}, then inspect the stacked notification styling and width constraints. Done means stacked notifications can use variable or dynamic widths without being forced to a small fixed width or running off the screen.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.