Skip to content

Commit a011a77

Browse files
committed
feat(themes): only add shadow by default if theme also specifies it as default
1 parent 532d6cf commit a011a77

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/Cutout/Cutout.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export const StyledCutout = styled.div`
3131
border-bottom-color: ${({ theme }) => theme.borderLight};
3232
3333
pointer-events: none;
34-
${props => props.shadow && `box-shadow:${insetShadow};`}
34+
${props =>
35+
props.theme.shadow && props.shadow && `box-shadow:${insetShadow};`}
3536
}
3637
`;
3738

src/common/index.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ export const createBorderStyles = ({
6464
border-top-color: ${({ theme }) => theme.borderDarkest};
6565
border-right-color: ${({ theme }) => theme.borderLightest};
6666
border-bottom-color: ${({ theme }) => theme.borderLightest};
67-
box-shadow: ${props => props.shadow && `${shadow}, `} inset 1px 1px 0px
68-
1px ${({ theme }) => theme.borderDark},
67+
box-shadow: ${props =>
68+
props.theme.shadow && props.shadow && `${shadow}, `}
69+
inset 1px 1px 0px 1px ${({ theme }) => theme.borderDark},
6970
inset -1px -1px 0 1px ${({ theme }) => theme.borderLight};
7071
`
7172
: css`
@@ -77,8 +78,9 @@ export const createBorderStyles = ({
7778
windowBorders ? theme.borderLight : theme.borderLightest};
7879
border-right-color: ${({ theme }) => theme.borderDarkest};
7980
border-bottom-color: ${({ theme }) => theme.borderDarkest};
80-
box-shadow: ${props => props.shadow && `${shadow}, `} inset 1px 1px 0px
81-
1px
81+
box-shadow: ${props =>
82+
props.theme.shadow && props.shadow && `${shadow}, `}
83+
inset 1px 1px 0px 1px
8284
${({ theme }) =>
8385
windowBorders ? theme.borderLightest : theme.borderLight},
8486
inset -1px -1px 0 1px ${({ theme }) => theme.borderDark};

0 commit comments

Comments
 (0)