Skip to content

Commit 08dc169

Browse files
committed
feat: 添加FullScreen组件
1 parent 3048795 commit 08dc169

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/components/FullScreen.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import ButtonIcon from './ButtonIcon';
2+
3+
interface Props {
4+
className?: string;
5+
full?: boolean;
6+
toggleFullscreen: () => void;
7+
}
8+
9+
const FullScreen = ({ className, full, toggleFullscreen }: Props) => {
10+
const { t } = useTranslation();
11+
12+
return (
13+
<ButtonIcon
14+
className={className}
15+
key={String(full)}
16+
tooltipContent={full ? t('icon.fullscreenExit') : t('icon.fullscreen')}
17+
onClick={toggleFullscreen}
18+
>
19+
{full ? <IconGridiconsFullscreenExit /> : <IconGridiconsFullscreen />}
20+
</ButtonIcon>
21+
);
22+
};
23+
24+
export default FullScreen;

0 commit comments

Comments
 (0)