feat: mobile app package (#1075)
This commit is contained in:
59
packages/mobile/src/Components/SectionedTableCell.ts
Normal file
59
packages/mobile/src/Components/SectionedTableCell.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import styled, { css } from 'styled-components/native'
|
||||
|
||||
export type Props = {
|
||||
first?: boolean
|
||||
last?: boolean
|
||||
textInputCell?: any
|
||||
height?: number
|
||||
extraStyles?: any
|
||||
}
|
||||
|
||||
export const SectionedTableCell = styled.View<Props>`
|
||||
border-bottom-color: ${props => props.theme.stylekitBorderColor};
|
||||
border-bottom-width: 1px;
|
||||
padding-left: ${props => props.theme.paddingLeft}px;
|
||||
padding-right: ${props => props.theme.paddingLeft}px;
|
||||
padding-bottom: ${props => (props.textInputCell ? 0 : 12)}px;
|
||||
background-color: ${props => props.theme.stylekitBackgroundColor};
|
||||
${({ first, theme }) =>
|
||||
first &&
|
||||
css`
|
||||
border-top-color: ${theme.stylekitBorderColor};
|
||||
border-top-width: ${1}px;
|
||||
`};
|
||||
${({ textInputCell }) =>
|
||||
textInputCell &&
|
||||
css`
|
||||
max-height: 50px;
|
||||
`};
|
||||
${({ height }) =>
|
||||
height &&
|
||||
css`
|
||||
height: ${height}px;
|
||||
`};
|
||||
`
|
||||
|
||||
export const SectionedTableCellTouchableHighlight = styled.TouchableHighlight<Props>`
|
||||
border-bottom-color: ${props => props.theme.stylekitBorderColor};
|
||||
border-bottom-width: 1px;
|
||||
padding-left: ${props => props.theme.paddingLeft}px;
|
||||
padding-right: ${props => props.theme.paddingLeft}px;
|
||||
padding-bottom: ${props => (props.textInputCell ? 0 : 12)}px;
|
||||
background-color: ${props => props.theme.stylekitBackgroundColor};
|
||||
${({ first, theme }) =>
|
||||
first &&
|
||||
css`
|
||||
border-top-color: ${theme.stylekitBorderColor};
|
||||
border-top-width: ${1}px;
|
||||
`};
|
||||
${({ textInputCell }) =>
|
||||
textInputCell &&
|
||||
css`
|
||||
max-height: 50px;
|
||||
`};
|
||||
${({ height }) =>
|
||||
height &&
|
||||
css`
|
||||
height: ${height}px;
|
||||
`};
|
||||
`
|
||||
Reference in New Issue
Block a user