Releases: nandorojo/burnt
0.12.2
0.12.1
0.12
0.11.6
0.11.5: Fix burnt/web
Close #17 by exposing burnt/web
, as shown in the docs.
v0.11.4
0.11: Web Support
New Features
Web Support
As of 0.11
, Burnt now wraps sonner
on Web. Sonner is a great Toast library by Emil Kowalski.
You'll need to import { Toaster } from 'burnt/web'
and render the <Toaster />
at the root of your website for burnt
to work on Web. You shouldn't import it on native.
// _app.tsx
import { Toaster } from "burnt/web";
function MyApp({ Component, pageProps }) {
return (
<>
<Component {...pageProps} />
<Toaster position='bottom-right' />
</>
);
}
To configure your Toaster
, please reference the sonner
docs.
Video
burnt-example.-.8.May.2023.mp4
0.10
New Features
preset: 'custom'
When you set preset: 'custom'
on alert
or toast
, you can now add a custom icon with the icon.ios
field.
Burnt.toast({
title: "This toast has more text, and it also has a custom icon.",
preset: "custom",
icon: {
ios: {
name: "circle",
color: "#F7A51D",
},
},
});
For a full catalog of icons, see Apple's SF Symbols.
Improved Types
When choosing a custom iOS icon, you'll get autocomplete.
Type suggestions for SF symbols provided by sf-symbols-typescript.
preset: 'none'
If you set preset: 'none'
, you can hide the icon altogether.
More text
You can now add 2 lines of text to the Burnt.toast
. The message
field is also optional now to make room for a longer title.
0.9: Customize layout
You can now customize the layout
for alert
and toast
on iOS:
import * as Burnt from "burnt";
export const alert = () => {
Burnt.alert({
title: "Congrats!", // required
preset: "done", // or "error", "heart"
message: "", // optional
duration: 2, // duration in seconds
// optionally customize layout
layout: {
iconSize: {
height: 24,
width: 24,
},
// TODO: custom SF Symbols...
},
});
};
In the future, we could add custom SF Symbols if there is interest.
0.8: Android Support
- Closes #2
- Adds Android support by implementing the native
ToastAndroid
fromreact-native
- No native changes or rebuilds are required! This is a JS-only update for Android