feat(infra): framework

This commit is contained in:
EYHN
2024-04-17 14:12:29 +08:00
parent ab17a05df3
commit 06fda3b62c
467 changed files with 9996 additions and 8697 deletions

View File

@@ -0,0 +1,28 @@
import clsx from 'clsx';
import type React from 'react';
import { errorMessage } from './style.css';
export const ErrorMessage = ({
children,
inline,
style,
className,
}: React.PropsWithChildren<{
inline?: boolean;
style?: React.CSSProperties;
className?: string;
}>) => {
if (inline) {
return (
<span style={style} className={clsx(className, errorMessage)}>
{children}
</span>
);
}
return (
<div style={style} className={clsx(className, errorMessage)}>
{children}
</div>
);
};

View File

@@ -0,0 +1 @@
export { ErrorMessage } from './error-message';

View File

@@ -0,0 +1,8 @@
import { cssVar } from '@toeverything/theme';
import { style } from '@vanilla-extract/css';
export const errorMessage = style({
color: cssVar('--affine-error-color'),
fontSize: '0.6rem',
margin: '4px 8px 2px 2px',
});