forked from auth0/lock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added checkbox CustomInput for additionalSignUpFields (auth0#860)
- Loading branch information
1 parent
63fa1f2
commit 5d84b2f
Showing
8 changed files
with
131 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import InputWrap from './input_wrap'; | ||
|
||
export default class CheckboxInput extends React.Component { | ||
render() { | ||
const { | ||
name, | ||
placeholder, | ||
checked | ||
} = this.props; | ||
return ( | ||
<div className="auth0-lock-input-checkbox"> | ||
<label> | ||
<input | ||
type="checkbox" | ||
checked={checked === 'true'} | ||
onChange={::this.handleOnChange} | ||
name={name} /> | ||
<span>{placeholder}</span> | ||
</label> | ||
</div> | ||
); | ||
} | ||
|
||
handleOnChange(e) { | ||
if (this.props.onChange) { | ||
this.props.onChange(e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters