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

Forms - Checkbox, Radio, Switch, Range and Checkbox/Radio/Switch List components #64

Merged
merged 2 commits into from
Apr 16, 2015

Conversation

mike-north
Copy link
Owner

Switch

{{materialize-switch value=switchValue disabled=false}}

Checkbox

{{!-- Standard variant --}}
{{materialize-checkbox value=checkValueOne}}
{{!-- Filled variant --}}
{{materialize-checkbox filledIn=true value=checkValueTwo}}
{{!-- Disabled --}}
{{materialize-checkbox disabled=true filledIn=true value=checkValueTwo}}

Range

{{materialize-range value=rangeValue}}

Radios

Two syntaxes to choose from

{{!-- Generate radios from a set of data --}}
{{materialize-radios content=choices value=selectedChoice}}

{{!-- Explicitly define each radio --}}
{{#materialize-radios value=selectedChoice}}
  {{materialize-radio label="First" value=1}}
  {{#materialize-radio value=2}}
    Second
    {{materialize-icon value="content-add"}}
  {{/materialize-radio}}
{{/materialize-radios}}

assert.equal(component._state, 'inDOM');
});

// disabledGroupTest();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tests for radio is missing

Copy link
Owner Author

Choose a reason for hiding this comment

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

Added. I have made a design decision to disallow {{materialize-radio}} outside the context of a {{materialize-radios}} group, so it is not tested independently. In the event that someone tries this, they'll get an error message telling them that it won't work

sgasser pushed a commit that referenced this pull request Apr 16, 2015
Forms - Checkbox, Radio, Switch, Range and Checkbox/Radio/Switch List components
@sgasser sgasser merged commit d5ed2a0 into mike-north:master Apr 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants