@chakra-ui/react#SelectProps TypeScript Examples

The following examples show how to use @chakra-ui/react#SelectProps. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TranslateButton.tsx    From rari-dApp with GNU Affero General Public License v3.0 6 votes vote down vote up
LanguageSelect = (extraProps: SelectProps) => {
  const { i18n } = useTranslation();

  return (
    <Select
      value={i18n.language}
      onChange={(event) => {
        i18n.changeLanguage(event.target.value);
        localStorage.setItem("rariLang", event.target.value);
      }}
      fontWeight="bold"
      width="100%"
      {...extraProps}
    >
      <option className="black-bg-option" value="en">
        English
      </option>
      <option className="black-bg-option" value="zh-CN">
        简体中文
      </option>
      <option className="black-bg-option" value="zh-TW">
        中國傳統的
      </option>
    </Select>
  );
}