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 = { const persian = {
weight: "وزن", weight: "وزن",
@ -12,17 +13,18 @@ const persian = {
}; };
const Table = ({ specifications }) => { const Table = ({ specifications }) => {
return ( return (
<ul className="w-full"> <ul className={`w-full`} >
{Object.keys(specifications).map((specification, index) => ( {Object.keys(specifications).map((specification, index) => (
<li className="flex my-3"> <li className={`flex my-3 cursor-pointer specifications-li`} >
<div <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 }} style={{ flex: 2 }}
> >
{persian[specification]} {persian[specification]}
</div> </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]} {specifications[specification]}
</div> </div>
</li> </li>

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

Loading…
Cancel
Save