Skip to content

Commit

Permalink
PropType’d LocaleSwitcher
Browse files Browse the repository at this point in the history
  • Loading branch information
rusnewman committed Dec 21, 2018
1 parent d9ccc60 commit 981aaf6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions components/LocaleSwitcher/LocaleSwitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {flagForLocale, locales} from '../../configs/locales';
import {connectToStores} from 'fluxible-addons-react';
import {Button, Dropdown, Icon} from 'semantic-ui-react';
import AriaMenuButton from 'react-aria-menubutton';
import PropTypes from 'prop-types';

class LocaleSwitcher extends React.Component {

Expand All @@ -16,6 +17,14 @@ class LocaleSwitcher extends React.Component {
};
}

static propTypes = {
/** Whether the LocaleSwitcher should trigger a language change when an item is selected. */
switchOnSelection: PropTypes.bool,

/** How this element should be rendered. */
mode: PropTypes.oneOf(['sidebarLocaleChangeButton', 'sidebarLocalesMenu', null]),
};

/**
* Sets the app Locale (UI language) to the selected value and reloads the page.
*
Expand Down

0 comments on commit 981aaf6

Please sign in to comment.