// @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 = { * ...borderColor('red', 'green', 'blue', 'yellow') * } * * // styled-components usage * const div = styled.div` * ${borderColor('red', 'green', 'blue', 'yellow')} * ` * * // CSS as JS Output * * div { * 'borderTopColor': 'red', * 'borderRightColor': 'green', * 'borderBottomColor': 'blue', * 'borderLeftColor': 'yellow' * } */ export default function borderColor(...values: Array): Styles { return directionalProperty('borderColor', ...values) }