mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-30 12:28:33 +08:00
32052bf5d8
* 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>
14 lines
353 B
TypeScript
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;
|