fix(in-app-menu): fix app crash in production

This commit is contained in:
Su-Yong
2024-02-05 23:14:00 +09:00
parent b3c05c8647
commit febc63edef
7 changed files with 143 additions and 132 deletions

View File

@ -1,7 +1,9 @@
import { JSX } from 'solid-js';
import { css } from 'solid-styled-components';
const iconButton = css`
import { cache } from '@/providers/decorators';
const iconButton = cache(() => css`
background: transparent;
width: 24px;
@ -28,12 +30,12 @@ const iconButton = css`
&:active {
scale: 0.9;
}
`;
`);
type CollapseIconButtonProps = JSX.HTMLAttributes<HTMLButtonElement>;
export const IconButton = (props: CollapseIconButtonProps) => {
return (
<button {...props} class={iconButton}>
<button {...props} class={iconButton()}>
{props.children}
</button>
);