add Divider component

This commit is contained in:
Pavel Prichodko 2023-01-18 16:41:57 +01:00
parent 94d6d8a58b
commit 611724f504
No known key found for this signature in database
GPG Key ID: 0EB8D75C775AB6F1
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,32 @@
import { Stack, styled } from '@tamagui/core'
export const Divider = styled(Stack, {
name: 'Divider',
backgroundColor: '$neutral-10',
flexShrink: 0,
// borderWidth: 0,
flex: 1,
height: '100%',
// maxHeight: 0,
width: 1,
marginHorizontal: 12,
// y: -0.5,
variants: {
// vertical: {
// true: {
// y: 0,
// x: -0.5,
// height: isWeb ? 'initial' : 'auto',
// // maxHeight auto WILL BE passed to style attribute, but for some reason not used?
// // almost seems like a react or browser bug, but for now `initial` works
// // also, it doesn't happen for `height`, but for consistency using the same values
// maxHeight: isWeb ? 'initial' : 'auto',
// width: 0,
// maxWidth: 0,
// borderBottomWidth: 0,
// borderRightWidth: 1,
// },
// },
} as const,
})

View File

@ -0,0 +1 @@
export * from './divider'

View File

@ -1,4 +1,7 @@
export * from './button' export * from './button'
export * from './chat-message'
export * from './divider'
export * from './icon-button'
export * from './image' export * from './image'
export * from './input' export * from './input'
export * from './shape' export * from './shape'