Files
nightmarket/client/plugin/components/ErrorLabel.tsx
2022-04-24 17:51:53 +01:00

13 lines
258 B
TypeScript

import { h } from "preact";
import { colors } from "../helpers/theme";
const styles = {
marginBottom: 16,
padding: 8,
color: colors.dfred,
};
export function ErrorLabel({ error }) {
return error ? <p style={styles}>Error: {error.message}</p> : null;
}