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

Button indeterminate #55

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Button indeterminate #55

wants to merge 8 commits into from

Conversation

RichardGarcia
Copy link
Collaborator

initial code button indeterminate state

@danalexilewis
Copy link
Contributor

danalexilewis commented Sep 20, 2018

ahhh which ticket is this code for?
NVM i see its for https://app.asana.com/0/745901885273784/823548934443860

As per the ticket this is for an "Icon Button" atom not a "Circular Indeterminate float button"

Ok so I see whats happening now :)

Copy link
Contributor

@danalexilewis danalexilewis left a comment

Choose a reason for hiding this comment

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

Ok so I don't think you understood what this ticket was about - reading the tickets now I am not surprised. I think we needed to talk about it more before you started so you had a chance to ask about its scope.

anyway the point was to add a spinner state for when the button had been clicked and it was waiting to do something.

yo can see by the snippet I added to this pr that this is just a case of swapping out the child component (text or icon) for a spinner.

const A016 = props => {
const { text, classes } = props
return (
<Fragment>
Copy link
Contributor

Choose a reason for hiding this comment

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

so I pulled the code and wrote this:

    <Button variant='contained' disabled={submitting}>
      {submitting ? (
        <CircularProgress size={22} />
      ) : (
        <Icon iconname={iconname} />
      )}
    </Button>

// List of stories of use cases for atom
storiesOf('Atoms|A016 - Circular Indeterminate button', module)
.add('Participate Order Button', () => (
<Button text={'Participate Order'} color={'default'} />
Copy link
Contributor

Choose a reason for hiding this comment

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

and this

  () => <Button iconname='add' submitting />

@danalexilewis
Copy link
Contributor

also the spinner state you added to the floating button should just go on A002

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.

2 participants