How to use the react-native-vector-icons/MaterialIcons.getImageSource function in react-native-vector-icons

To help you get started, we’ve selected a few react-native-vector-icons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mattermost / mattermost-mobile / app / components / reactions / reactions.js View on Github external
handleAddReaction = preventDoubleTap(() => {
        const {theme} = this.props;
        const {formatMessage} = this.context.intl;
        const screen = 'AddReaction';
        const title = formatMessage({id: 'mobile.post_info.add_reaction', defaultMessage: 'Add Reaction'});

        MaterialIcon.getImageSource('close', 20, theme.sidebarHeaderTextColor).then((source) => {
            const passProps = {
                closeButton: source,
                onEmojiPress: this.handleAddReactionToPost,
            };

            showModal(screen, title, passProps);
        });
    });
github sijad / react-native-navigation-starter / src / commons / icons.ts View on Github external
icons.map(async k => {
      iconsCache[k] = await Icon.getImageSource(k.toString(), 24);
    }),
  );
github mattermost / mattermost-mobile / app / components / client_upgrade_listener / client_upgrade_listener.js View on Github external
constructor(props) {
        super(props);

        MaterialIcon.getImageSource('close', 20, this.props.theme.sidebarHeaderTextColor).then((source) => {
            this.closeButton = source;
        });

        this.state = {
            top: new Animated.Value(-100),
        };
    }
github mattermost / mattermost-mobile / app / components / sidebars / main / channels_list / channels_list.js View on Github external
constructor(props) {
        super(props);

        this.state = {
            searching: false,
            term: '',
        };

        MaterialIcon.getImageSource('close', 20, this.props.theme.sidebarHeaderTextColor).then((source) => {
            this.closeButton = source;
        });
    }
github mattermost / mattermost-mobile / app / screens / post_options / post_options.js View on Github external
this.close(() => {
            MaterialIcon.getImageSource('close', 20, theme.sidebarHeaderTextColor).then((source) => {
                const screen = 'EditPost';
                const title = intl.formatMessage({id: 'mobile.edit_post.title', defaultMessage: 'Editing Message'});
                const passProps = {
                    post,
                    closeButton: source,
                };

                showModal(screen, title, passProps);
            });
        });
    };
github mattermost / mattermost-mobile / app / screens / channel / channel_base.js View on Github external
showTermsOfServiceModal = async () => {
        const {intl} = this.context;
        const {theme} = this.props;
        const closeButton = await MaterialIcon.getImageSource('close', 20, theme.sidebarHeaderTextColor);
        const screen = 'TermsOfService';
        const passProps = {closeButton};
        const title = intl.formatMessage({id: 'mobile.tos_link', defaultMessage: 'Terms of Service'});
        const options = {
            layout: {
                backgroundColor: theme.centerChannelBg,
            },
            topBar: {
                visible: true,
                height: null,
                title: {
                    color: theme.sidebarHeaderTextColor,
                    text: title,
                },
            },
        };
github mattermost / mattermost-mobile / app / components / sidebars / main / channels_list / list / list.js View on Github external
super(props);

        this.combinedActionsRef = React.createRef();

        this.state = {
            sections: this.buildSections(props),
            showIndicator: false,
            width: 0,
        };

        this.keyboardDismissProp = {
            keyboardDismissMode: Platform.OS === 'ios' ? 'interactive' : 'none',
            onScrollBeginDrag: this.scrollBeginDrag,
        };

        MaterialIcon.getImageSource('close', 20, this.props.theme.sidebarHeaderTextColor).then((source) => {
            this.closeButton = source;
        });
    }
github mattermost / mattermost-mobile / app / components / sidebars / main / teams_list / teams_list.js View on Github external
constructor(props) {
        super(props);

        this.state = {
            serverUrl: '',
        };

        MaterialIcon.getImageSource('close', 20, props.theme.sidebarHeaderTextColor).then((source) => {
            this.closeButton = source;
        });

        getCurrentServerUrl().then((url) => {
            this.setState({serverUrl: removeProtocol(url)});
        });
    }
github Dennitz / Timetable / src / lib / iconSources.js View on Github external
iconNamePropsPairs.map(([iconName, iconProps]) =>
      Icon.getImageSource(iconName, iconProps.size),
    ),
github mattermost / mattermost-mobile / app / components / sidebars / main / channels_list / list / list.js View on Github external
super(props);

        this.combinedActionsRef = React.createRef();

        this.state = {
            sections: this.buildSections(props),
            showIndicator: false,
            width: 0,
        };

        this.keyboardDismissProp = {
            keyboardDismissMode: Platform.OS === 'ios' ? 'interactive' : 'none',
            onScrollBeginDrag: this.scrollBeginDrag,
        };

        MaterialIcon.getImageSource('close', 20, this.props.theme.sidebarHeaderTextColor).then((source) => {
            this.closeButton = source;
        });
    }