mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 12:20:20 +01:00
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { m as motion } from "motion/react";
|
|
import styled from "styled-components";
|
|
import StyledLoading from "components/system/Apps/StyledLoading";
|
|
|
|
type StyledWindowProps = {
|
|
$backgroundBlur?: string;
|
|
$backgroundColor?: string;
|
|
$isForeground: boolean;
|
|
};
|
|
|
|
const StyledWindow = styled(motion.section)<StyledWindowProps>`
|
|
background-color: ${({ $backgroundColor, theme }) =>
|
|
$backgroundColor || theme.colors.window.background};
|
|
box-shadow: ${({ $isForeground, theme }) =>
|
|
$isForeground
|
|
? theme.colors.window.shadow
|
|
: theme.colors.window.shadowInactive};
|
|
contain: strict;
|
|
height: 100%;
|
|
outline: ${({ $isForeground, theme }) =>
|
|
`${theme.sizes.window.outline} solid ${
|
|
$isForeground
|
|
? theme.colors.window.outline
|
|
: theme.colors.window.outlineInactive
|
|
}`};
|
|
overflow: hidden;
|
|
position: absolute;
|
|
width: 100%;
|
|
|
|
header + * {
|
|
height: ${({ theme }) => `calc(100% - ${theme.sizes.titleBar.height}px)`};
|
|
}
|
|
|
|
${StyledLoading} {
|
|
backdrop-filter: ${({ $backgroundBlur }) =>
|
|
$backgroundBlur ? `blur(${$backgroundBlur})` : undefined};
|
|
}
|
|
`;
|
|
|
|
export default StyledWindow;
|