Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Modal): add mini and tiny sizes #1853

Merged
merged 1 commit into from
Jul 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -84,7 +84,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