Language Menu
It inherits from the ButtonList component. It displays a list of language buttons with or without flags in a 4x3 or 1x1 format. When the number of buttons exceeds a specified threshold (controlled by the maxButtonItems property), the component dynamically transforms into a dropdown menu.
- Import
import { LanguageMenu } from '@smile/haring-react';
- Extends ButtonList
- Source View Source Code
- Package @smile/haring-react
- Storybook Storybook
Storybook Docs
Props
LanguageMenu takes a <Data>
generic type that extends Record<string, unknown>
, to be used by ActionList.
Name | Type | Default | Description |
---|---|---|---|
languages * | ILang[] | - | Is the array of langs of type ILang displayed into the component |
squareFormat | boolean | false | Displays the default 4x3 format, If this prop is set to true, it shows flags in a 1x1 format |
... | - | Extend props from ButtonList component |
ILang
Name | Type | Description |
---|---|---|
country | string | |
... | extends IOption |