feat(HtmlView): selectable property (#10057)

This commit is contained in:
Ruslan Lekhman
2022-10-14 19:47:59 -06:00
committed by GitHub
parent 4a0e1c9aa1
commit ca9c0928d0
4 changed files with 38 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
import { CssProperty } from '../core/properties';
import { View, CSSType } from '../core/view';
import { booleanConverter } from '../core/view-base';
import { Property } from '../core/properties';
import { Style } from '../styling/style';
import { Color } from '../../color';
@@ -8,6 +9,7 @@ import { HtmlView as HtmlViewDefinition } from '.';
@CSSType('HtmlView')
export class HtmlViewBase extends View implements HtmlViewDefinition {
public html: string;
public selectable: boolean;
}
HtmlViewBase.prototype.recycleNativeView = 'auto';
@@ -20,6 +22,13 @@ export const htmlProperty = new Property<HtmlViewBase, string>({
});
htmlProperty.register(HtmlViewBase);
export const selectableProperty = new Property<HtmlViewBase, boolean>({
name: 'selectable',
defaultValue: true,
valueConverter: booleanConverter,
});
selectableProperty.register(HtmlViewBase);
export const linkColorProperty = new CssProperty<Style, Color>({
name: 'linkColor',
cssName: 'link-color',