polished#backgrounds JavaScript Examples
The following examples show how to use
polished#backgrounds.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: drawer.js From idena-web with MIT License | 6 votes |
function Drawer({show, onHide, ...props}) {
const ref = useRef()
useClickOutside(ref, () => {
onHide()
})
return show ? (
<Box
style={{
...backgrounds(transparentize(0.2, theme.colors.black)),
...cover(),
position: 'fixed',
zIndex: 1300,
}}
>
<Absolute
bg={theme.colors.white}
zIndex={1301}
top={0}
bottom={0}
right={0}
width={rem(360)}
ref={ref}
{...props}
/>
<Absolute top="1em" right="1em" zIndex={1301}>
<FiX
color={theme.colors.muted}
fontSize={theme.fontSizes.large}
onClick={onHide}
cursor="pointer"
/>
</Absolute>
</Box>
) : null
}