[change] Replace outline with outline{Color,Style,Width} styles

Rather than mix shortform and longform properties, the 'outline' property is
removed in favour of the longform properties. Support for `outlineOffset` is
also included.

Fix #1255
Close #1256
This commit is contained in:
Nicolas Gallagher
2019-03-01 14:15:58 -08:00
parent c68b532696
commit f048d848a1
3 changed files with 19 additions and 7 deletions
@@ -15,8 +15,9 @@ import InteractionPropTypes from '../../modules/InteractionPropTypes';
import LayoutPropTypes from '../../modules/LayoutPropTypes';
import ShadowPropTypes from '../../modules/ShadowPropTypes';
import TransformPropTypes from '../../modules/TransformPropTypes';
import { number, oneOf, string } from 'prop-types';
import { number, oneOf, oneOfType, string } from 'prop-types';
const stringOrNumber = oneOfType([string, number]);
const overscrollBehaviorType = oneOf(['auto', 'contain', 'none']);
const ViewStylePropTypes = {
@@ -47,8 +48,10 @@ const ViewStylePropTypes = {
boxShadow: string,
clip: string,
filter: string,
outline: string,
outlineColor: ColorPropType,
outlineOffset: stringOrNumber,
outlineStyle: string,
outlineWidth: stringOrNumber,
overscrollBehavior: overscrollBehaviorType,
overscrollBehaviorX: overscrollBehaviorType,
overscrollBehaviorY: overscrollBehaviorType,
@@ -732,13 +732,23 @@ const stylePropTypes = [
},
{
label: 'web',
name: 'outline',
name: 'outlineColor',
typeInfo: 'color'
},
{
label: 'web',
name: 'outlineOffset',
typeInfo: 'number | string'
},
{
label: 'web',
name: 'outlineStyle',
typeInfo: 'string'
},
{
label: 'web',
name: 'outlineColor',
typeInfo: 'color'
name: 'outlineWidth',
typeInfo: 'number | string'
},
{
name: 'overflow',
@@ -126,8 +126,7 @@ const calculatorKeyStyles = StyleSheet.create({
borderTopStyle: 'solid',
borderRightWidth: 1,
borderRightColor: '#666',
borderRightStyle: 'solid',
outline: 'none'
borderRightStyle: 'solid'
},
text: {
fontWeight: '100',