Skip to content

Default display:block interferes with flexbox layouts and other complications  #47

@jmbldwn

Description

@jmbldwn

I ended up making my own wrapper to inherit display properties to fix this. Curious why this isn't the default?

import React from 'react';
import PropTypes from 'prop-types';
import LoadingOverlay from 'react-loading-overlay';

const Loading = ({ active, text, children }) => (
    <LoadingOverlay
        active={active}
        spinner text={text}
        styles={{
            wrapper: {
                display: 'inherit',
                'flex-grow': 'inherit'
            }
        }}>
        {children}
    </LoadingOverlay>
);

Loading.propTypes = {
    active: PropTypes.bool,
    text: PropTypes.string,
    children: PropTypes.node
};

export default Loading;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions