import * as React from 'react';
import { FunctionComponent } from 'react';
import { View, ViewStyle } from 'react-native';

const BoardToolbar: FunctionComponent<{ visible?: boolean, style?: ViewStyle, children: React.ReactNode }> = ({ children, visible, style }) => {
    if (visible === false) return <></>;
    return (
        <View style={[style, {
            display: 'flex',
            flexDirection: 'row',
            alignItems: 'center',
            justifyContent: 'space-between',
            alignSelf: 'stretch',
        }]} >
            {children}
        </View>
    );
}

export default BoardToolbar;