forked from facebook/react-native-website
-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #931 from facebook/main
sync
- Loading branch information
Showing
233 changed files
with
44,864 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
id: boxshadowvalue | ||
title: BoxShadowValue Object Type | ||
--- | ||
|
||
The `BoxShadowValue` object is taken by the [`boxShadow`](./view-style-props.md#boxshadow) style prop. It is comprised of 2-4 lengths, an optional color, and an optional `inset` boolean. These values collectively define the box shadow's color, position, size, and blurriness. | ||
|
||
## Example | ||
|
||
```js | ||
{ | ||
offsetX: 10, | ||
offsetY: -3, | ||
blurRadius: '15px', | ||
spreadDistance: '10px', | ||
color: 'red', | ||
inset: true, | ||
} | ||
``` | ||
|
||
## Keys and values | ||
|
||
### `offsetX` | ||
|
||
The offset on the x-axis. This can be positive or negative. A positive value indicates right and negative indicates left. | ||
|
||
| Type | Optional | | ||
| ---------------- | -------- | | ||
| number \| string | No | | ||
|
||
### `offsetY` | ||
|
||
The offset on the y-axis. This can be positive or negative. A positive value indicates up and negative indicates down. | ||
|
||
| Type | Optional | | ||
| ---------------- | -------- | | ||
| number \| string | No | | ||
|
||
### `blurRadius` | ||
|
||
Represents the radius used in the [Guassian blur](https://en.wikipedia.org/wiki/Gaussian_blur) algorithm. The larger the value the blurrier the shadow is. Only non-negative values are valid. The default is 0. | ||
|
||
| Type | Optional | | ||
| --------------- | -------- | | ||
| numer \| string | Yes | | ||
|
||
### `spreadDistance` | ||
|
||
How much larger or smaller the shadow grows or shrinks. A positive value will grow the shadow, a negative value will shrink the shadow. | ||
|
||
| Type | Optional | | ||
| --------------- | -------- | | ||
| numer \| string | Yes | | ||
|
||
### `color` | ||
|
||
The color of the shadow. The default is `black`. | ||
|
||
| Type | Optional | | ||
| -------------------- | -------- | | ||
| [color](./colors.md) | Yes | | ||
|
||
### `inset` | ||
|
||
Whether the shadow is inset or not. Inset shadows will appear around the inside of the element's border box as opposed to the outside. | ||
|
||
| Type | Optional | | ||
| ------- | -------- | | ||
| boolean | Yes | | ||
|
||
## Used by | ||
|
||
- [`boxShadow`](./view-style-props.md#boxshadow) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
id: dropshadowvalue | ||
title: DropShadowValue Object Type | ||
--- | ||
|
||
The `DropShadowValue` object is taken by the [`filter`](./view-style-props.md#filter) style prop for the `dropShadow` function. It is comprised of 2 or 3 lengths and an optional color. These values collectively define the drop shadow's color, position, and blurriness. | ||
|
||
## Example | ||
|
||
```js | ||
{ | ||
offsetX: 10, | ||
offsetY: -3, | ||
standardDeviation: '15px', | ||
color: 'blue', | ||
} | ||
``` | ||
|
||
## Keys and values | ||
|
||
### `offsetX` | ||
|
||
The offset on the x-axis. This can be positive or negative. A positive value indicates right and negative indicates left. | ||
|
||
| Type | Optional | | ||
| ---------------- | -------- | | ||
| number \| string | No | | ||
|
||
### `offsetY` | ||
|
||
The offset on the y-axis. This can be positive or negative. A positive value indicates up and negative indicates down. | ||
|
||
| Type | Optional | | ||
| ---------------- | -------- | | ||
| number \| string | No | | ||
|
||
### `standardDeviation` | ||
|
||
Represents the standard deviation used in the [Guassian blur](https://en.wikipedia.org/wiki/Gaussian_blur) algorithm. The larger the value the blurrier the shadow is. Only non-negative values are valid. The default is 0. | ||
|
||
| Type | Optional | | ||
| --------------- | -------- | | ||
| numer \| string | Yes | | ||
|
||
### `color` | ||
|
||
The color of the shadow. The default is `black`. | ||
|
||
| Type | Optional | | ||
| -------------------- | -------- | | ||
| [color](./colors.md) | Yes | | ||
|
||
## Used by | ||
|
||
- [`filter`](./view-style-props.md#filter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.