Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
const labelCol = 3
const inputCol = 9
return (
<form>
Avatar Style
<label>
<input checked="{avatarStyle" value="{AvatarStyle.Circle}" name="avatar-style" id="avatar-style-circle" type="radio">{' '}
Circle
</label>{' '}
<label>
<input checked="{avatarStyle" value="{AvatarStyle.Transparent}" name="avatar-style" id="avatar-style-transparent" type="radio">{' '}
Transparent
</label></form>
const labelCol = 3
const inputCol = 9
return (
<form>
Avatar Style
<label>
<input checked="{avatarStyle" value="{AvatarStyle.Circle}" name="avatar-style" id="avatar-style-circle" type="radio">{' '}
Circle
</label>{' '}
<label>
<input checked="{avatarStyle" value="{AvatarStyle.Transparent}" name="avatar-style" id="avatar-style-transparent" type="radio">{' '}
Transparent
</label>
</form>
interface State {
displayComponentCode: boolean,
displayComponentImg: boolean
}
function capitalizeFirstLetter (text: string) {
return text.charAt(0).toUpperCase() + text.slice(1)
}
export class Main extends React.Component {
static childContextTypes = {
optionContext: PropTypes.instanceOf(OptionContext)
}
static defaultProps = {
avatarStyle: AvatarStyle.Circle
}
state = {
displayComponentCode: false,
displayComponentImg: false
}
private avatarRef: Avatar | null = null
private canvasRef: HTMLCanvasElement | null = null
private optionContext: OptionContext = new OptionContext(allOptions)
getChildContext () {
return { optionContext: this.optionContext }
}
componentWillReceiveProps (nextProps: Props) {
updateType
}
])
),
avatarStyle: {
type: UrlQueryParamTypes.string,
updateType
}
}
export class Renderer extends React.Component {
static childContextTypes = {
optionContext: PropTypes.instanceOf(OptionContext)
}
static defaultProps = {
avatarStyle: AvatarStyle.Circle
}
private optionContext: OptionContext = new OptionContext(allOptions)
getChildContext () {
return { optionContext: this.optionContext }
}
componentWillReceiveProps (nextProps: Props) {
this.updateOptionContext(nextProps)
}
componentWillMount () {
this.updateOptionContext(this.props)
}