You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,8 +82,8 @@ import { Shadow } from 'react-native-shadow-2';
82
82
| **distance** | How far the shadow goes. | `number` | `10`
83
83
| **offset** | Moves the shadow. Negative `x` moves it left/start, negative `y` moves it up.<br/><br/>Accepts `'x%'` values.<br/><br/>Defining this will default `paintInside` to **true**, as it's the usual desired behaviour. | `[x: string \| number, y: string \| number]` | `[0, 0]`
84
84
| **paintInside** | Apply the shadow below/inside the content. `startColor` is used as fill color, without a gradient.<br/><br/>Useful when using `offset` or if your child has some transparency. | `boolean` | `false`, but `true` if `offset` is defined
85
-
| **sides** | The sides that will have their shadows drawn. Doesn't include corners. | `("left" \| "right" \| "top" \| "bottom")[]` | `['left', 'right', 'top', 'bottom']`
86
-
| **corners** | The corners that will have their shadows drawn. | `("topStart" \| "topEnd" \| "bottomStart" \| "bottomEnd")[]` | `['topStart', 'topEnd', 'bottomStart', 'bottomEnd']`
85
+
| **sides** | The sides that will have their shadows drawn. Doesn't include corners. Undefined sides fallbacks to **true**. | `Record<'left' \| 'right' \| 'top' \| 'bottom', boolean>` | `undefined`
86
+
| **corners** | The corners that will have their shadows drawn. Undefined corners fallbacks to **true**. | `Record<'topStart' \| 'topEnd' \| 'bottomStart' \| 'bottomEnd', boolean>` | `undefined`
87
87
| **style** | The style of the View that wraps your children. Read the note at the end. | `StyleProp<ViewStyle>` | `undefined`
88
88
| **containerStyle** | The style of the View that wraps the Shadow and your children. Useful for margins. | `StyleProp<ViewStyle>` | `undefined`
89
89
| **stretch** | Make your children ocuppy all available horizontal space. [Explanation](https://github.com/SrBrahma/react-native-shadow-2/issues/7#issuecomment-899784537). | `boolean` | `false`
@@ -92,11 +92,11 @@ import { Shadow } from 'react-native-shadow-2';
92
92
93
93
## Notes
94
94
95
-
* If the Shadow has a single child, it will get the `width`, `height` and all of the `borderRadius` properties from the children's `style` property, if defined.*(It's so easy to use this!)*
95
+
* If the Shadow has a single child, it will get the `width`, `height` and all of the `borderRadius` properties from the children's `style` property, if defined.
96
96
97
-
* You may also define those properties in the Shadow's `style`. The defined properties here will have priority over the ones defined in the Child's `style`.
97
+
* You may also define those properties in the Shadow's `style`. The defined properties here will have priority over the ones defined in the child's `style`.
98
98
99
-
* If the `width` and `height`is defined in any of those, there will be only a single render, as the first automatic sizing won't happen, only the precise render.
99
+
* If the `width`**and**`height`are defined in any of those, there will be only a single render, as the first automatic sizing won't happen, only the precise render.
100
100
101
101
* You can use either the `'borderTopLeftRadius'` or `'borderTopStartRadius'` and their variations to define the corners radii, although I recommend the latter as it's the RTL standard.
0 commit comments