Skip to content

Commit 34af810

Browse files
committed
tweak bordered app shadows
1 parent e46e64c commit 34af810

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/components/BorderedApp/BorderedApp.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import React, { KeyboardEvent, RefObject, useCallback, useRef } from "react";
2+
import { darken } from "polished";
3+
24
import useWindowManagerStore, {
35
BaseProps,
46
} from "../../stores/windowManagerStore";
@@ -189,7 +191,10 @@ function BorderedApp<
189191
</StyledWindowButtonsWrapper>
190192
</StyledTitleBar>
191193
<StyledContent className="bordered-app__content">
192-
<StyledContentInner className="bordered-app__content-inner">
194+
<StyledContentInner
195+
className="bordered-app__content-inner"
196+
shadowColor={darken(0.1, mainColor)}
197+
>
193198
{children}
194199
</StyledContentInner>
195200
</StyledContent>

src/components/BorderedApp/styles.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const StyledBorderedApp = styled.div<StyledBorderedAppProps>`
2424
border-radius: 10px;
2525
box-shadow:
2626
0px -2px 10px 1px rgb(0, 0, 0, 0.4),
27-
0 -0.5px 1px #8d8d8d inset;
27+
0px 0px 3px rgb(141, 141, 141, 0.5) inset;
2828
position: fixed;
2929
width: ${(props) => props.initialDimensions.width}px;
3030
height: ${(props) => props.initialDimensions.height}px;
@@ -156,10 +156,14 @@ export const StyledContent = styled.div`
156156
padding-top: 0;
157157
`;
158158

159-
export const StyledContentInner = styled.div`
159+
interface StyledContentInnerProps {
160+
shadowColor: string;
161+
}
162+
export const StyledContentInner = styled.div<StyledContentInnerProps>`
160163
width: 100%;
161164
height: 100%;
162-
box-shadow: 0px 0px 4px rgb(0, 0, 0, 0.5) inset;
165+
box-shadow: 0px 0px 4px ${(p) => p.shadowColor} inset;
166+
163167
overflow: hidden;
164168
border-radius: 10px;
165169
box-sizing: border-box;

0 commit comments

Comments
 (0)