Package Exports
- @smollweide/material-ui-speed-dial
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@smollweide/material-ui-speed-dial) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
material-ui-speed-dial (❗Work in process) 
Components, that implements material design speed dial for material-ui v1
Installation
For the installation of Material-UI please have look in the Material-UI Documentation
Material-UI speed dial is available as an npm package.
npm install @smollweide/material-ui-speed-dial
Usage
import React from 'react';
import { withStyles } from 'material-ui/styles';
import Button from 'material-ui/Button';
import Avatar from 'material-ui/Avatar';
import AddIcon from 'material-ui-icons/Add';
import EditIcon from 'material-ui-icons/Edit';
import SpeedDial, { SpeedDialItem, SpeedDialLabel, SpeedDialBackdrop } from '@smollweide/material-ui-speed-dial';
import presetFixedBottomRight from '@smollweide/material-ui-speed-dial/dist/presets/presetFixedBottomRight';
const MyMaterialUiSpeedDial = ({ classes }) => {
return (
<SpeedDial
preset={classes}
renderButton={(props, propsIcon) => (
<Button {...props} variant="fab" color="primary" aria-label="add">
<AddIcon {...propsIcon} />
</Button>
)}
renderOpenedButton={(props, propsIcon) => (
<Button {...props} variant="fab" color="secondary" aria-label="edit">
<EditIcon {...propsIcon} />
</Button>
)}
renderList={props => <ul {...props} />}
renderBackdrop={(props) => <SpeedDialBackdrop {...props} />}
>
{props => [
<SpeedDialItem
{...props}
key="c"
renderAvatar={propsAvatar => (
<Avatar {...propsAvatar} alt="Eric Hoffman" src="http://lorempixel.com/80/80/people/3" />
)}
>
{propsLabel => <SpeedDialLabel {...propsLabel} text="Eric Hoffman" />}
</SpeedDialItem>,
<SpeedDialItem
{...props}
key="b"
renderAvatar={propsAvatar => (
<Avatar {...propsAvatar} alt="Grace Ng" src="http://lorempixel.com/80/80/people/9" />
)}
>
{propsLabel => <SpeedDialLabel {...propsLabel} text="Grace Ng" />}
</SpeedDialItem>,
<SpeedDialItem {...{ ...props, className: `${props.className} ${classes.firstItem}` }} key="a">
{propsLabel => <SpeedDialLabel {...propsLabel} text="Edit" />}
</SpeedDialItem>,
]}
</SpeedDial>
);
};
MyMaterialUiSpeedDial.displayName = 'MyMaterialUiSpeedDial';
export default withStyles(presetFixedBottomRight)(MyMaterialUiSpeedDial);
Examples
Shields
Contributing
This project was bootstrapped with Create React App.
Getting started
- Fork the material-ui-speed-dial repository on Github
- Clone your fork to your local machine
git clone git@github.com:<yourname>/material-ui-speed-dial.git
- Create a branch
git checkout -b my-topic-branch
- Make your changes and add tests for them, lint, test then push to to github with
git push --set-upstream origin my-topic-branch
. - Visit github and make your pull request.
Scripts
- Install
npm install
- Start developing
npm start
- Lint
npm run lint
- Test
npm test
- Build
npm run build
Coding style
Please follow the coding style of the current code base.
material-ui-speed-dial uses eslint, so if possible, enable linting in your editor to get realtime feedback.
The linting rules can be run manually with npm run lint
.