You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							31 lines
						
					
					
						
							810 B
						
					
					
				
			
		
		
	
	
							31 lines
						
					
					
						
							810 B
						
					
					
				| // @flow
 | |
| import directionalProperty from '../helpers/directionalProperty'
 | |
| 
 | |
| import type { Styles } from '../types/style'
 | |
| 
 | |
| /**
 | |
|  * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.
 | |
|  * @example
 | |
|  * // Styles as object usage
 | |
|  * const styles = {
 | |
|  *   ...borderStyle('solid', 'dashed', 'dotted', 'double')
 | |
|  * }
 | |
|  *
 | |
|  * // styled-components usage
 | |
|  * const div = styled.div`
 | |
|  *   ${borderStyle('solid', 'dashed', 'dotted', 'double')}
 | |
|  * `
 | |
|  *
 | |
|  * // CSS as JS Output
 | |
|  *
 | |
|  * div {
 | |
|  *   'borderTopStyle': 'solid',
 | |
|  *   'borderRightStyle': 'dashed',
 | |
|  *   'borderBottomStyle': 'dotted',
 | |
|  *   'borderLeftStyle': 'double'
 | |
|  * }
 | |
|  */
 | |
| export default function borderStyle(...values: Array<?string>): Styles {
 | |
|   return directionalProperty('borderStyle', ...values)
 | |
| }
 |