Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
}}>
<option value="{GenderConst.UNKNOWN_PLURAL}">Gender:</option>
<option value="{GenderConst.FEMALE_SINGULAR}">
Female (Singular)
</option>
<option value="{GenderConst.MALE_SINGULAR}">
Male (Singular)
</option>
<option value="{GenderConst.NOT_A_PERSON}">
Not a person
</option>
<option value="{GenderConst.UNKNOWN_PLURAL}">
Unknown (Plural)
</option>
<option value="{GenderConst.UNKNOWN_SINGULAR}">
Unknown (Singular)
</option>
<fieldset>
<span>
{/* Use and for a complex sentence */}
{this.state.ex2Name} has a {ExampleEnum[this.state.ex2Object]}{' '}
to share!
{/*
{this.state.ex2Name}
has a</span></fieldset>
ex1Gender: Variation,
ex1Count: int,
ex2Name: string,
ex2Object: SharedObj,
ex2Pronoun: PronounGender,
|};
export default class Example extends React.Component {
state = {
locale: 'en_US',
ex1Name: 'Someone',
ex1Gender: IntlVariations.GENDER_UNKNOWN,
ex1Count: 1,
ex2Name: 'Someone',
ex2Object: 'LINK',
ex2Pronoun: GenderConst.UNKNOWN_SINGULAR,
};
setLocale(locale: Locale) {
IntlViewerContext.locale = locale;
this.setState({locale});
const html = document.getElementsByTagName('html')[0];
if (html != null) {
html.lang = LOCALES[locale].bcp47;
}
document.body.className = LOCALES[locale].rtl ? 'rtl' : 'ltr';
}
onSubmit(event: SyntheticInputEvent<>) {
event.stopPropagation();
event.preventDefault();
}
ex1Gender: Variation,
ex1Count: int,
ex2Name: string,
ex2Object: SharedObj,
ex2Pronoun: PronounGender,
|};
export default class Example extends React.Component {
state = {
locale: 'en_US',
ex1Name: 'Someone',
ex1Gender: IntlVariations.GENDER_UNKNOWN,
ex1Count: 1,
ex2Name: 'Someone',
ex2Object: 'LINK',
ex2Pronoun: GenderConst.UNKNOWN_SINGULAR,
};
setLocale(locale: Locale) {
IntlViewerContext.locale = locale;
this.setState({locale});
const html = document.getElementsByTagName('html')[0];
if (html != null) {
html.lang = LOCALES[locale].bcp47;
}
document.body.className = LOCALES[locale].rtl ? 'rtl' : 'ltr';
}
onSubmit(event: SyntheticInputEvent<>) {
event.stopPropagation();
event.preventDefault();
}
className="neatoSelect"
onChange={(event: SyntheticUIEvent<>) => {
this.setState({
ex2Pronoun: parseInt(event.target.value, 10),
});
}}>
<option value="{GenderConst.UNKNOWN_PLURAL}">
Gender:
</option>
<option value="{GenderConst.NOT_A_PERSON}">
Not a person
</option>
<option value="{GenderConst.UNKNOWN_PLURAL}">
Unknown (Plural)
</option>
<option value="{GenderConst.UNKNOWN_SINGULAR}">
Unknown (singular)
</option>
<option value="{GenderConst.MALE_SINGULAR}">
Male (singular)
</option>
<option value="{GenderConst.FEMALE_SINGULAR}">
Female (singular)
</option>
<fieldset>
<span>
</span></fieldset>