Mark dialog close button as unused
This commit is contained in:
@@ -6,12 +6,10 @@ import {msg} from '@lingui/macro'
|
|||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
import {useTheme, atoms as a, useBreakpoints, web} from '#/alf'
|
import {useTheme, atoms as a, useBreakpoints, web} from '#/alf'
|
||||||
import {Text} from '#/components/Typography'
|
|
||||||
import {Portal} from '#/components/Portal'
|
import {Portal} from '#/components/Portal'
|
||||||
import {Button} from '#/components/Button'
|
|
||||||
|
|
||||||
import {DialogOuterProps, DialogInnerProps} from '#/components/Dialog/types'
|
import {DialogOuterProps, DialogInnerProps} from '#/components/Dialog/types'
|
||||||
import {Context, useDialogContext} from '#/components/Dialog/context'
|
import {Context} from '#/components/Dialog/context'
|
||||||
|
|
||||||
export {useDialogControl, useDialogContext} from '#/components/Dialog/context'
|
export {useDialogControl, useDialogContext} from '#/components/Dialog/context'
|
||||||
export * from '#/components/Dialog/types'
|
export * from '#/components/Dialog/types'
|
||||||
@@ -172,38 +170,25 @@ export function Handle() {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Close() {
|
/**
|
||||||
const {_} = useLingui()
|
* TODO(eric) unused rn
|
||||||
const t = useTheme()
|
*/
|
||||||
const {close} = useDialogContext()
|
// export function Close() {
|
||||||
return (
|
// const {_} = useLingui()
|
||||||
<View
|
// const t = useTheme()
|
||||||
style={[
|
// const {close} = useDialogContext()
|
||||||
a.absolute,
|
// return (
|
||||||
a.z_10,
|
// <View
|
||||||
{
|
// style={[
|
||||||
top: a.pt_lg.paddingTop,
|
// a.absolute,
|
||||||
right: a.pr_lg.paddingRight,
|
// a.z_10,
|
||||||
},
|
// {
|
||||||
]}>
|
// top: a.pt_lg.paddingTop,
|
||||||
<Button onPress={close} label={_(msg`Close active dialog`)}>
|
// right: a.pr_lg.paddingRight,
|
||||||
{() => (
|
// },
|
||||||
<View
|
// ]}>
|
||||||
style={[
|
// <Button onPress={close} label={_(msg`Close active dialog`)}>
|
||||||
a.justify_center,
|
// </Button>
|
||||||
a.align_center,
|
// </View>
|
||||||
a.rounded_full,
|
// )
|
||||||
t.atoms.bg_contrast_200,
|
// }
|
||||||
{
|
|
||||||
pointerEvents: 'none',
|
|
||||||
height: 32,
|
|
||||||
width: 32,
|
|
||||||
},
|
|
||||||
]}>
|
|
||||||
<Text>X</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user