csstype#VisibilityProperty TypeScript Examples

The following examples show how to use csstype#VisibilityProperty. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RichTextEditor.tsx    From querybook with Apache License 2.0 6 votes vote down vote up
@bind
    public calculateToolBarStyle(selection: DraftJs.SelectionState) {
        const isVisible = !selection.isCollapsed() && selection.getHasFocus();
        const position =
            (isVisible ? this.calculateToolBarPosition() : null) || {};

        return {
            ...position,
            visibility: (isVisible
                ? 'visible'
                : 'hidden') as VisibilityProperty,
        };
    }