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

Alert component #45

Merged
merged 2 commits into from
Sep 8, 2017
Merged

Alert component #45

merged 2 commits into from
Sep 8, 2017

Conversation

jpellizzari
Copy link
Contributor

Adds an Alert component:
screen shot 2017-09-08 at 9 11 14 am

Also fixes some issues with <Button />:

  • Button was ignoring the style prop that is used in a couple places in Weave Cloud
  • Button would throw an error on click if no callback is provided. This props is optional.

Copy link
Contributor

@aaron7 aaron7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - a few comments

import styled from 'styled-components';
import PropTypes from 'prop-types';

const fromTheme = (component, field) => props => props.theme.atoms[component][props.type][field];

This comment was marked as abuse.

padding: 1em;
transition: opacity 0.2s linear;

.fa-remove {

This comment was marked as abuse.

});
it('closes when the "x" is clicked', () => {
const spy = jest.fn();
const alert = mount(withTheme(<Alert onClose={spy}>My alert</Alert>));

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

This comment was marked as abuse.

@bowenli
Copy link
Contributor

bowenli commented Sep 8, 2017

lgtm

@jpellizzari jpellizzari merged commit 78b9243 into master Sep 8, 2017
@jpellizzari jpellizzari deleted the alert-component branch September 8, 2017 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants