Skip to content

Commit

Permalink
feat(themes): only add shadow by default if theme also specifies it a…
Browse files Browse the repository at this point in the history
…s default
  • Loading branch information
WesSouza committed Jul 20, 2022
1 parent 701b807 commit 887f8c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Cutout/Cutout.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const StyledCutout = styled.div`
border-bottom-color: ${({ theme }) => theme.borderLight};
pointer-events: none;
${props => props.shadow && `box-shadow:${insetShadow};`}
${props =>
props.theme.shadow && props.shadow && `box-shadow:${insetShadow};`}
}
`;

Expand Down
10 changes: 6 additions & 4 deletions src/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ export const createBorderStyles = ({
border-top-color: ${({ theme }) => theme.borderDarkest};
border-right-color: ${({ theme }) => theme.borderLightest};
border-bottom-color: ${({ theme }) => theme.borderLightest};
box-shadow: ${props => props.shadow && `${shadow}, `} inset 1px 1px 0px
1px ${({ theme }) => theme.borderDark},
box-shadow: ${props =>
props.theme.shadow && props.shadow && `${shadow}, `}
inset 1px 1px 0px 1px ${({ theme }) => theme.borderDark},
inset -1px -1px 0 1px ${({ theme }) => theme.borderLight};
`
: css`
Expand All @@ -77,8 +78,9 @@ export const createBorderStyles = ({
windowBorders ? theme.borderLight : theme.borderLightest};
border-right-color: ${({ theme }) => theme.borderDarkest};
border-bottom-color: ${({ theme }) => theme.borderDarkest};
box-shadow: ${props => props.shadow && `${shadow}, `} inset 1px 1px 0px
1px
box-shadow: ${props =>
props.theme.shadow && props.shadow && `${shadow}, `}
inset 1px 1px 0px 1px
${({ theme }) =>
windowBorders ? theme.borderLightest : theme.borderLight},
inset -1px -1px 0 1px ${({ theme }) => theme.borderDark};
Expand Down

0 comments on commit 887f8c4

Please sign in to comment.