0.2.0 • Published 7 years ago

material-ui-settings-panel v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Material Settings Panel

Build Status Greenkeeper badge

NPM

A settings component in material ui style inspired by google admin console and google inbox. See the storybook for an interactive demo.

Demo

Installation

npm i --save material-ui-settings-panel
npm i --save react-onclickoutside

Usage

import { 
  ExpandablePanel, 
  HeaderPanel, 
  SettingsGroup, 
  SettingsItem, 
  SettingsPanel
} from 'material-ui-settings-panel'

// ...

render() {
  return (
    <div>
        <SettingsPanel>
          <HeaderPanel
            title="Gmail"
            subtitle="Für alle aktiviert"
            description="https://mail.google.com/a/company.com"
            image={<img src="https://ssl.gstatic.com/apps/cpanel/resources/img/gmail-128.png" />}
          />
          <ExpandablePanel
            title="Nutzer Einstellungen"
            description="Sed diam nonumy eirmod tempor invidunt ut labore"
          >
            <SettingsGroup title="Lorem ipsum">
              <SettingsItem title="Lorem ipsum" description="Description">
                <div>
                  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, 
                  sed diam nonumy eirmod tempor invidunt ut labore
                  et dolore magna aliquyam erat, sed diam voluptua.
                </div>
              </SettingsItem>
              <SettingsItem title="Lorem ipsum">
                <div>
                  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, 
                  sed diam nonumy eirmod tempor invidunt ut labore
                  et dolore magna aliquyam erat, sed diam voluptua.
                </div>
              </SettingsItem>
            </SettingsGroup>
          </ExpandablePanel>
          <ExpandablePanel
            title="E-Mail-Adressen"
            description="Lassen Sie sich alle E-Mail-Adressen und Aliase für Ihre Organisation anzeigen."
          >
          </ExpandablePanel>
        </SettingsPanel>
    </div>
  )
}

SettingsPanel Properties

NameTypeDefaultDescription
styleobjectOverride the inline-styles of the root component.

HeaderPanel Properties

NameTypeDefaultDescription
descriptionstringDescription for the header.
imagenodeImage for the header.
imageStyleobjectOverride the inline-styles of the image container.
styleobjectOverride the inline-styles of the root component.
subtitlestringSubtitle for the header.
textStyleobjectOverride the inline-styles of the text container.
title*stringTitle for the header.

ExpandablePanel Properties

NameTypeDefaultDescription
descriptionstringDescription for the panel.
styleobjectOverride the inline-styles of the root component.
textStyleobjectOverride the inline-styles of the text container.
title*stringTitle for the panel.

SettingsGroup Properties

NameTypeDefaultDescription
styleobjectOverride the inline-styles of the root component.
title*stringTitle for the group.

SettingsItem Properties

NameTypeDefaultDescription
descriptionstringDescription for the panel.
styleobjectOverride the inline-styles of the root component.
title*stringTitle for the panel.

* required property

License

The files included in this repository are licensed under the MIT license.