Skip to content

Commit

Permalink
feat(Modal): add mini and tiny sizes (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored and levithomason committed Jul 16, 2017
1 parent d57d511 commit 5f7be15
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class ModalExampleSize extends Component {

return (
<div>
<Button onClick={this.show('mini')}>Mini</Button>
<Button onClick={this.show('tiny')}>Tiny</Button>
<Button onClick={this.show('small')}>Small</Button>
<Button onClick={this.show('large')}>Large</Button>
<Button onClick={this.show('fullscreen')}>Fullscreen</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Modal/Modal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface ModalProps extends PortalProps {
open?: boolean;

/** A modal can vary in size. */
size?: 'fullscreen' | 'large' | 'small';
size?: 'fullscreen' | 'large' | 'mini' | 'small' | 'tiny';

/** Custom styles. */
style?: React.CSSProperties;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Modal extends Component {
open: PropTypes.bool,

/** A modal can vary in size */
size: PropTypes.oneOf(['fullscreen', 'large', 'small']),
size: PropTypes.oneOf(['fullscreen', 'large', 'mini', 'small', 'tiny']),

/** Custom styles. */
style: PropTypes.object,
Expand Down
2 changes: 1 addition & 1 deletion test/specs/modules/Modal/Modal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ describe('Modal', () => {

describe('size', () => {
it('adds the size to the modal className', () => {
const sizes = ['fullscreen', 'large', 'small']
const sizes = ['fullscreen', 'large', 'mini', 'small', 'tiny']

sizes.forEach(size => {
wrapperMount(<Modal size={size} open />)
Expand Down

0 comments on commit 5f7be15

Please sign in to comment.