import { Match, Show, Switch } from "solid-js"; import { Image } from "../Image"; import { typeImages } from "./typeImages"; import { useClassList } from "../utils/useProps" import { Text } from "../Typography/Text"; import { Button } from "../Button"; type ExceptionProps = { classList?: any, class?: string, type?: '404'|'403'|'500'|'empty'|'fail'|'deny', typeImage?: any, desc?: string, showDesc?: boolean, link?: string, showAction?: boolean, } export function Exception(props: ExceptionProps) { const classList = () => useClassList(props, 'cm-exception', { [`cm-exception-${props.type}`]: !!props.type }); const showDesc = props.showDesc ?? true; const showAction = props.showAction ?? true; return