refactor: css and key addition

This commit is contained in:
themohammadsa 2023-06-24 03:10:23 +05:30
parent 9aa7c88369
commit 4ad9e31cfe
2 changed files with 5 additions and 5 deletions

View file

@ -13,12 +13,12 @@ const ShortcutButton = ({ text }: Props) => {
return (
<div>
{btnText.map((value, i) => (
<>
<span key={value}>
<span className="rounded border border-gray-200 bg-gray-100 px-[6px] py-[2px] text-xs font-semibold text-gray-800 dark:border-gray-500 dark:bg-gray-600 dark:text-gray-100">
{formatText(value)}
</span>
{i < btnTextLength && <span className="px-1">+</span>}
</>
</span>
))}
</div>
);

View file

@ -26,14 +26,14 @@ const ShortcutsModal = ({ isOpen, onClose }: Props) => {
return (
<>
<Modal isOpen={isOpen} onClose={onClose}>
<div className="flex w-[350px] flex-col gap-4">
<div className="flex w-[380px] flex-col gap-4 px-2">
{Object.values(shortcutsList).map((category) => (
<div key={category.id}>
<h3 className="mb-4 border-b border-slate-600 pb-1 text-lg">
<h3 className="mb-3 border-b border-slate-600 pb-1 text-lg">
{category.name}
</h3>
{category.shortcuts.map((value) => (
<div className="my-3 flex justify-between ">
<div className="my-2.5 flex justify-between" key={value[0]}>
<ShortcutName text={value[0]} />
<ShortcutButton text={value[1]} />
</div>