feat(core): box-shadow support (#9161)

This commit is contained in:
Nathan Walker
2021-01-29 11:24:11 -08:00
parent 6cc130fa6f
commit 67e2fe42b7
14 changed files with 364 additions and 12 deletions

View File

@@ -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.
*/

View File

@@ -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;
}