import { Property } from 'csstype'; import { colorFormatter, pxFormatter, themeFormatter } from '../utils/formatter'; import { cssProperty } from '../utils/style'; import { ColorPropertyTheme, RadiusPropertyTheme, ShadowPropertyTheme, TLength } from './typings'; export const border = cssProperty>('border'); export const borderTop = cssProperty>('border-top'); export const borderBottom = cssProperty>('border-bottom'); export const borderLeft = cssProperty>('border-left'); export const borderRight = cssProperty>('border-right'); export const borderColor = cssProperty( null, colorFormatter('border-color', 'border-opacity'), ); export const borderTopColor = cssProperty( null, colorFormatter('border-top-color', 'border-top-opacity'), ); export const borderBottomColor = cssProperty( null, colorFormatter('border-bottom-color', 'border-bottom-opacity'), ); export const borderLeftColor = cssProperty( null, colorFormatter('border-left-color', 'border-left-opacity'), ); export const borderRightColor = cssProperty( null, colorFormatter('border-right-color', 'border-right-opacity'), ); export const borderImage = cssProperty('border-image'); export const borderImageOutset = cssProperty>('border-image-outset'); export const borderImageRepeat = cssProperty('border-image-repeat'); export const borderImageSlice = cssProperty('border-image-slice'); export const borderImageSource = cssProperty('border-image-source'); export const borderImageWidth = cssProperty>('border-image-width'); export const borderOpacity = cssProperty('--border-opacity'); export const borderTopOpacity = cssProperty('--border-top-opacity'); export const borderBottomOpacity = cssProperty('-border-bottom-opacity'); export const borderLeftOpacity = cssProperty('--border-left-opacity'); export const borderRightOpacity = cssProperty('--border-right-opacity'); export const borderRadius = cssProperty>( 'border-radius', themeFormatter('radius'), ); export const borderTopLeftRadius = cssProperty>( 'border-top-left-radius', themeFormatter('radius'), ); export const borderBottomLeftRadius = cssProperty>( 'border-bottom-left-radius', themeFormatter('radius'), ); export const borderTopRightRadius = cssProperty>( 'border-top-right-radius', themeFormatter('radius'), ); export const borderBottomRightRadius = cssProperty>( 'border-bottom-right-radius', themeFormatter('radius'), ); export const borderStyle = cssProperty('border-style'); export const borderTopStyle = cssProperty('border-top-style'); export const borderBottomStyle = cssProperty('border-bottom-style'); export const borderLeftStyle = cssProperty('border-left-style'); export const borderRightStyle = cssProperty('border-right-style'); export const borderWidth = cssProperty>('border-width', pxFormatter); export const borderTopWidth = cssProperty>('border-top-width', pxFormatter); export const borderBottomWidth = cssProperty>( 'border-bottom-width', pxFormatter, ); export const borderLeftWidth = cssProperty>( 'border-left-width', pxFormatter, ); export const borderRightWidth = cssProperty>( 'border-right-width', pxFormatter, ); export const boxShadow = cssProperty('box-shadow', themeFormatter('shadow'));