mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(core): box-shadow support (#9161)
This commit is contained in:
6
packages/core/ui/core/view/index.d.ts
vendored
6
packages/core/ui/core/view/index.d.ts
vendored
@@ -6,6 +6,7 @@ import { Animation, AnimationDefinition, AnimationPromise } from '../../animatio
|
||||
import { HorizontalAlignment, VerticalAlignment, Visibility, Length, PercentLength } from '../../styling/style-properties';
|
||||
import { GestureTypes, GestureEventData, GesturesObserver } from '../../gestures';
|
||||
import { LinearGradient } from '../../styling/gradient';
|
||||
import { BoxShadow } from '../../styling/box-shadow';
|
||||
|
||||
// helpers (these are okay re-exported here)
|
||||
export * from './view-helper';
|
||||
@@ -250,6 +251,11 @@ export abstract class View extends ViewBase {
|
||||
*/
|
||||
backgroundImage: string | LinearGradient;
|
||||
|
||||
/**
|
||||
* Gets or sets the box shadow of the view.
|
||||
*/
|
||||
boxShadow: string | BoxShadow;
|
||||
|
||||
/**
|
||||
* Gets or sets the minimum width the view may grow to.
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,7 @@ import { LinearGradient } from '../../styling/linear-gradient';
|
||||
import { TextTransform } from '../../text-base';
|
||||
|
||||
import * as am from '../../animation';
|
||||
import { BoxShadow } from '../../styling/box-shadow';
|
||||
|
||||
// helpers (these are okay re-exported here)
|
||||
export * from './view-helper';
|
||||
@@ -581,6 +582,13 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
|
||||
this.style.backgroundRepeat = value;
|
||||
}
|
||||
|
||||
get boxShadow(): BoxShadow {
|
||||
return this.style.boxShadow;
|
||||
}
|
||||
set boxShadow(value: BoxShadow) {
|
||||
this.style.boxShadow = value;
|
||||
}
|
||||
|
||||
get minWidth(): Length {
|
||||
return this.style.minWidth;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user