ant-design/.dumi/theme/slots/LiveError/index.tsx
Peach 32052bf5d8
docs: update live demo logic with dumi 2.3 beta ()
* docs: update live demo api with dumi 2.3 beta

* docs: lint fix

* refactor: update naming of demo source

* feat: optimize souce code editor style

* chore: update dumi version

* chore: restore dumi overrides

* ci: setup before lint only for ci

* chore: trigger ci re-run

* chore: bump dumi version

---------

Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: MadCcc <1075746765@qq.com>
Co-authored-by: lijianan <574980606@qq.com>
2024-01-09 22:51:55 +08:00

14 lines
353 B
TypeScript

import type { FC } from 'react';
import React from 'react';
import { Alert, theme } from 'antd';
const LiveError: FC<{ error?: Error }> = ({ error }) => {
const { token } = theme.useToken();
return error ? (
<Alert banner type="error" message={error.toString()} style={{ color: token.colorError }} />
) : null;
};
export default LiveError;