Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ILengthSidesOptions<All, Top, Left, Right, Bottom>

The options for the LengthSides class. Provides a way to customise how the style mixins get created. A set of length divisions are provided that are changed into style mixins with the convert function.

example
Conversion function for border width values into style mixins ```ts function convert(side: Side, value: number): IAll | ITop | ILeft | IRight | IBottom { switch (side) { case 'all': return { borderWidth: Math.max(StyleSheet.hairlineWidth, value) }; case 'top': return { borderTopWidth: Math.max(StyleSheet.hairlineWidth, value) }; case 'left': return { borderLeftWidth: Math.max(StyleSheet.hairlineWidth, value) }; case 'right': return { borderRightWidth: Math.max(StyleSheet.hairlineWidth, value) }; case 'bottom': return { borderBottomWidth: Math.max(StyleSheet.hairlineWidth, value) }; default: return assertNever(side); } } ```

Type parameters

  • All: ViewStyle

  • Top: ViewStyle

  • Left: ViewStyle

  • Right: ViewStyle

  • Bottom: ViewStyle

Hierarchy

  • ILengthSidesOptions

Index

Properties

Properties

convert

convert: LengthSidesConvert<All | Top | Left | Right | Bottom>

length

length: ILength