Skip to content

Commit 9e5bc15

Browse files
committed
chore: cleanup
1 parent 7c17ef7 commit 9e5bc15

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

src/core/cssproperties.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
import { Color, CoreTypes, CssProperty, Style } from '@nativescript/core';
22

3-
function createGetter(key) {
4-
return function () {
5-
return this.style[key];
6-
};
7-
}
8-
function createSetter(key) {
9-
return function (newVal) {
10-
this.style[key] = newVal;
11-
};
12-
}
13-
143
export const cssProperty = (target: Object, key: string | symbol) => {
154
Object.defineProperty(target, key, {
16-
get: createGetter(key),
17-
set: createSetter(key),
5+
get() {
6+
return this.style[key];
7+
},
8+
set(newVal) {
9+
this.style[key] = newVal;
10+
},
1811
enumerable: true,
1912
configurable: true
2013
});
2114
};
22-
2315
export const rippleColorProperty = new CssProperty<Style, Color>({
2416
name: 'rippleColor',
2517
cssName: 'ripple-color',

0 commit comments

Comments
 (0)