Comments (7)
This was removed in favor of explicitly rendering/designing the toasts. The key driver for this decision is to make the toasts work in all frameworks without bias for React.
If you're okay with the TS error, you can still achieve the render function code like so:
https://codesandbox.io/p/sandbox/toast-custom-render-mcjvjf?file=%2Fsrc%2Ftoast.tsx%3A10%2C30
Another approach is to use functions for the title and description, these functions can return JSX if you want.
Thanks for understanding.
from zag.
@tyko0x This is an example of the function method
https://codesandbox.io/p/sandbox/quirky-fast-zqxph8?file=%2Fsrc%2Ftoast.tsx%3A6%2C20
from zag.
I don't have access to either of those sandboxes - could you provide a snippet of the function method?
from zag.
@tyko0x I've made it public
from zag.
I still can't access it. Code sandbox is not simple like it used to be 😞
from zag.
@tyko0x Try now. 😁
from zag.
Got it, and the example makes sense. Thanks.
from zag.
Related Issues (20)
- Controlled popovers does not return focus to popover trigger when closed HOT 1
- Docs(whats-a-machine): connect function does not return `getButtonProps` function
- Tree View: Selected item should not regain focus when reentering the tree.
- Menu: lazyMounting causes first menu item to not be focused HOT 1
- pauseOnInteraction doesn't exist on toast machine HOT 2
- FileUpload: "value" property
- Date picker incorrectly formats date when specified in "dd.mm.yy" format HOT 2
- `@zag-js/svelte` `peerDependencies` is misconfigured HOT 2
- Tree View: programmatic selection does not account for singular selection HOT 2
- Closing a popover programmatically does not return focus to trigger HOT 1
- date-utils: getWeekDays has incoherent behavior when both locale and startOfWeekProp are set HOT 1
- Controlled not working in svelte
- Aria validity in stepper HOT 1
- File Upload doesn't set proper aria-invalid state HOT 2
- Datepicker min changed dynamically error HOT 5
- `persistentElements` on dismissable doesn't work as expected when the elements are appended and removed multiple times HOT 2
- `TreeView` loses focus under some conditions
- Change max prop of Slider after creation HOT 2
- FileUpload directory prop not work HOT 1
- Checkbox does not set `data-focus` on click HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zag.