From eec0f74eedf3805e3cec52964baf191dab53dcbb Mon Sep 17 00:00:00 2001 From: devilkiller-ag Date: Wed, 8 Jan 2025 19:05:58 +0530 Subject: [PATCH] added language icon --- components/icons/Icons.mdx | 5 +++ components/icons/Language.tsx | 24 +++++++++++++ .../languageSelector/LanguageSelect.tsx | 35 +++++++++++-------- components/navigation/MobileNavMenu.tsx | 17 ++------- 4 files changed, 52 insertions(+), 29 deletions(-) create mode 100644 components/icons/Language.tsx diff --git a/components/icons/Icons.mdx b/components/icons/Icons.mdx index cb6496377a38..81743e573ba2 100644 --- a/components/icons/Icons.mdx +++ b/components/icons/Icons.mdx @@ -30,6 +30,7 @@ import IconGuide from './Guide'; import IconHome from './Home'; import IconHub from './Hub'; import InfoIcon from './InfoIcon'; +import IconLanguage from './Language'; import IconLightBulb from './LightBulb'; import IconLinkedIn from './LinkedIn'; import IconLoupe from './Loupe'; @@ -236,6 +237,10 @@ These are the icons used in the AsyncAPI website. + + + + diff --git a/components/icons/Language.tsx b/components/icons/Language.tsx new file mode 100644 index 000000000000..75372e2c111c --- /dev/null +++ b/components/icons/Language.tsx @@ -0,0 +1,24 @@ +import React from 'react'; + +/* eslint-disable max-len */ +/** + * @description Icons for asyncapi website + */ +export default function IconLanguage({ className = '' }) { + return ( + + + + ); +} diff --git a/components/languageSelector/LanguageSelect.tsx b/components/languageSelector/LanguageSelect.tsx index d815992adf31..317dc9809d0f 100644 --- a/components/languageSelector/LanguageSelect.tsx +++ b/components/languageSelector/LanguageSelect.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { twMerge } from 'tailwind-merge'; import type { SelectProps } from '../form/Select'; +import IconLanguage from '../icons/Language'; /** * @description LanguageSelect component for selecting a language. @@ -12,19 +13,25 @@ import type { SelectProps } from '../form/Select'; */ export default function LanguageSelect({ className = '', onChange = () => {}, options = [], selected }: SelectProps) { return ( - +
+
+ {/* Display Icon Next to the Select Box */} + + +
+
); } diff --git a/components/navigation/MobileNavMenu.tsx b/components/navigation/MobileNavMenu.tsx index 08abae518e54..29eb933c0b56 100644 --- a/components/navigation/MobileNavMenu.tsx +++ b/components/navigation/MobileNavMenu.tsx @@ -2,6 +2,7 @@ import Link from 'next/link'; import React, { useState } from 'react'; import { SearchButton } from '../AlgoliaSearch'; +import IconLanguage from '../icons/Language'; import NavItemDropdown from '../icons/NavItemDropdown'; import SearchIcon from '../icons/SearchIcon'; import AsyncAPILogo from '../logos/AsyncAPILogo'; @@ -140,21 +141,7 @@ export default function MobileNavMenu({

- Language{' '} - - - + Language