mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-02 02:25:22 +00:00
[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:
@@ -15,8 +15,9 @@ import InteractionPropTypes from '../../modules/InteractionPropTypes';
|
|||||||
import LayoutPropTypes from '../../modules/LayoutPropTypes';
|
import LayoutPropTypes from '../../modules/LayoutPropTypes';
|
||||||
import ShadowPropTypes from '../../modules/ShadowPropTypes';
|
import ShadowPropTypes from '../../modules/ShadowPropTypes';
|
||||||
import TransformPropTypes from '../../modules/TransformPropTypes';
|
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 overscrollBehaviorType = oneOf(['auto', 'contain', 'none']);
|
||||||
|
|
||||||
const ViewStylePropTypes = {
|
const ViewStylePropTypes = {
|
||||||
@@ -47,8 +48,10 @@ const ViewStylePropTypes = {
|
|||||||
boxShadow: string,
|
boxShadow: string,
|
||||||
clip: string,
|
clip: string,
|
||||||
filter: string,
|
filter: string,
|
||||||
outline: string,
|
|
||||||
outlineColor: ColorPropType,
|
outlineColor: ColorPropType,
|
||||||
|
outlineOffset: stringOrNumber,
|
||||||
|
outlineStyle: string,
|
||||||
|
outlineWidth: stringOrNumber,
|
||||||
overscrollBehavior: overscrollBehaviorType,
|
overscrollBehavior: overscrollBehaviorType,
|
||||||
overscrollBehaviorX: overscrollBehaviorType,
|
overscrollBehaviorX: overscrollBehaviorType,
|
||||||
overscrollBehaviorY: overscrollBehaviorType,
|
overscrollBehaviorY: overscrollBehaviorType,
|
||||||
|
|||||||
@@ -732,13 +732,23 @@ const stylePropTypes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'web',
|
label: 'web',
|
||||||
name: 'outline',
|
name: 'outlineColor',
|
||||||
|
typeInfo: 'color'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'web',
|
||||||
|
name: 'outlineOffset',
|
||||||
|
typeInfo: 'number | string'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'web',
|
||||||
|
name: 'outlineStyle',
|
||||||
typeInfo: 'string'
|
typeInfo: 'string'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'web',
|
label: 'web',
|
||||||
name: 'outlineColor',
|
name: 'outlineWidth',
|
||||||
typeInfo: 'color'
|
typeInfo: 'number | string'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'overflow',
|
name: 'overflow',
|
||||||
|
|||||||
@@ -126,8 +126,7 @@ const calculatorKeyStyles = StyleSheet.create({
|
|||||||
borderTopStyle: 'solid',
|
borderTopStyle: 'solid',
|
||||||
borderRightWidth: 1,
|
borderRightWidth: 1,
|
||||||
borderRightColor: '#666',
|
borderRightColor: '#666',
|
||||||
borderRightStyle: 'solid',
|
borderRightStyle: 'solid'
|
||||||
outline: 'none'
|
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
fontWeight: '100',
|
fontWeight: '100',
|
||||||
|
|||||||
Reference in New Issue
Block a user