specifications hover Done

temp
Pedram Keshavarzi 3 years ago
parent 727949f470
commit 7668a41592
  1. 6
      src/components/ProductTab/table/index.css
  2. 12
      src/components/ProductTab/table/index.js
  3. 2
      src/router.js

@ -0,0 +1,6 @@
.specifications-li:hover div{
background-color: rgba(25,110,192,0.2);
}
.specifications-li div{
transition: all 0.2s;
}

@ -1,4 +1,5 @@
import React from "react";
import React, { useState } from "react";
import './index.css';
const persian = {
weight: "وزن",
@ -12,17 +13,18 @@ const persian = {
};
const Table = ({ specifications }) => {
return (
<ul className="w-full">
<ul className={`w-full`} >
{Object.keys(specifications).map((specification, index) => (
<li className="flex my-3">
<li className={`flex my-3 cursor-pointer specifications-li`} >
<div
className="bg-grayF9 rounded p-3 ml-2 text-blue-600 text-sm"
className={` bg-grayF9 rounded p-3 ml-2 text-blue-600 text-sm`}
style={{ flex: 2 }}
>
{persian[specification]}
</div>
<div className="bg-grayF9 rounded p-3 text-sm" style={{ flex: 8 }}>
<div className={`bg-grayF9 rounded p-3 text-sm`} style={{ flex: 8 }}>
{specifications[specification]}
</div>
</li>

@ -363,7 +363,7 @@ function Router({
title: false,
back: false,
shown: true,
menu: false,
menu: true,
}}
/>
}

Loading…
Cancel
Save