Skip to content

Expose defaults for panel widthss #41

Description

@sarendipitee

Currently, defaults for sizes are hardcoded in, but it'd be nice to be able to specify the defaults for all panels for situations where you want the same defaultMinSize for all panels but you don't know the number of panels ahead of time and don't want to keep re-creating the panelWidths array.

https://github.com/DanFessler/react-panelgroup/blob/master/src/PanelGroup.js#L81-L84

      const defaultSize = 256;
      const defaultMinSize = 48;
      const defaultMaxSize = 0;
      const defaultResize = 'stretch';

to

      const defaultSize = this.props.defaultSize || 256;
      const defaultMinSize = this.props.defaultMinSize || 48;
      const defaultMaxSize = this.props.defaultMinSize || 0;
      const defaultResize = 'stretch';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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