feat: add styled-components (#1126)

This commit is contained in:
Aman Harwara
2022-06-21 12:49:30 +05:30
committed by GitHub
parent 49bb5c2001
commit 946d50b5df
3 changed files with 14 additions and 13 deletions

View File

@@ -77,7 +77,8 @@
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-touch-backend": "^16.0.1",
"react-dom": "^18.1.0"
"react-dom": "^18.1.0",
"styled-components": "^5.3.5"
},
"lint-staged": {
"app/**/*.{js,ts,jsx,tsx}": "eslint --cache --fix",

View File

@@ -1,12 +1,20 @@
import { getPlatformString } from '@/Utils'
import { DialogOverlay, DialogContent } from '@reach/dialog'
import { ReactNode } from 'react'
import styled from 'styled-components'
type Props = {
children: ReactNode
onDismiss: () => void
}
const StyledDialogContent = styled(DialogContent)`
width: 90%;
max-width: 90%;
min-height: 90%;
background: var(--modal-background-color);
`
const HistoryModalDialog = ({ children, onDismiss }: Props) => {
return (
<DialogOverlay
@@ -14,18 +22,9 @@ const HistoryModalDialog = ({ children, onDismiss }: Props) => {
onDismiss={onDismiss}
aria-label="Note revision history"
>
<DialogContent
aria-label="Note revision history"
className="rounded shadow-overlay"
style={{
width: '90%',
maxWidth: '90%',
minHeight: '90%',
background: 'var(--modal-background-color)',
}}
>
<StyledDialogContent aria-label="Note revision history" className="rounded shadow-overlay">
<div className="bg-default flex flex-col h-full overflow-hidden">{children}</div>
</DialogContent>
</StyledDialogContent>
</DialogOverlay>
)
}