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

Vytvorit/nastylovat error alert #226

Closed
rtrembecky opened this issue Nov 13, 2023 · 0 comments · Fixed by #473
Closed

Vytvorit/nastylovat error alert #226

rtrembecky opened this issue Nov 13, 2023 · 0 comments · Fixed by #473
Assignees
Milestone

Comments

@rtrembecky
Copy link
Collaborator

rtrembecky commented Nov 13, 2023

zatial na rychle spravy pouzivame javacsriptovy alert('Moja sprava'), ktory to tak skaredsie browser-nativne zakrici... vieme spravit vlastny alert podobne ako dialogy, co uz mame.
dbal by som ale na ease of use, takze keby sme chceli zachovat jednoduchy usage ako:

<button onClick={() => alert('daco sa pokazilo')}>alert</button>

tak by som k tomu pridal max dalsi riadok, napr.

const {alert} = useAlert()
...
<button onClick={() => alert('daco sa pokazilo')}>alert</button>

a tym padom by som inklinoval k novemu Containeru (context provideru), ktory do stranky prida nejaky vzdy-mountnuty dialog, ktory sa zavolanim alert len naplni a otvori.

malo by to byt pomerne jednoduche 🙁

@rtrembecky rtrembecky added this to the 1.1 milestone Nov 13, 2023
@vgeffer vgeffer self-assigned this Dec 10, 2023
@vgeffer vgeffer modified the milestones: 1.1, 2.0 Dec 10, 2023
@vgeffer vgeffer linked a pull request Nov 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants