-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: geo location dropdown bugfixes in playground (#181)
* fix: geo location dropdown bugfixes in playground * feat: added 'PlaceholderMenuItem' component to display in case of no records for a dropdown list
- Loading branch information
1 parent
03b688c
commit 01188b3
Showing
8 changed files
with
101 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/i18nify-playground/src/components/placeholderMenuItem/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './placeholderMenuItem'; |
11 changes: 11 additions & 0 deletions
11
packages/i18nify-playground/src/components/placeholderMenuItem/placeholderMenuItem.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
import { MenuItem } from '@mui/material'; | ||
|
||
import { MENU_ITEM_PLACEHOLDER_CONTENT } from 'src/constants/geo'; | ||
|
||
const PlaceholderMenuItem = (props) => { | ||
const { content = MENU_ITEM_PLACEHOLDER_CONTENT } = props; | ||
return <MenuItem disabled>{content}</MenuItem>; | ||
}; | ||
|
||
export default PlaceholderMenuItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export const ALLOWED_COUNTRIES = ['IN', 'MY', 'FR', 'DE', 'US']; | ||
export const MENU_ITEM_PLACEHOLDER_CONTENT = 'No data available'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters