master
parent
fd81940ad0
commit
7a1b732cb7
4 changed files with 111 additions and 1 deletions
@ -0,0 +1,56 @@ |
||||
import React, { useState } from "react"; |
||||
import SwitchDesign from "../SwitchDesign/Switch"; |
||||
|
||||
const ThemeColor = () => { |
||||
const colors = ["#9253a1", "#f063a4", "#2dc5f4"]; |
||||
|
||||
const [background, setBackground] = useState("#071415"); |
||||
const [current, setCurrent] = useState(null); |
||||
|
||||
return ( |
||||
<div className="w-full h-screen flex flex-col items-center bg-[#e1f5ff] rounded-sm border border-[#b8dff3]"> |
||||
<h2 className="mt-4 text-2xl text-blue-900 font-sansbold"> |
||||
Theme Properties |
||||
</h2> |
||||
<p className="mt-2 px-2 py-0.5 bg-blue-900 text-white font-sansbold rounded-sm"> |
||||
Theme Name |
||||
</p> |
||||
<p className="text-xs mt-2 text-blue-900 font-sansbold"> |
||||
Version: |
||||
<span className="ml-1">1</span> |
||||
</p> |
||||
<div className="w-full flex flex-row items-center justify-between mt-7"> |
||||
{/* right */} |
||||
<div className="bg-purple-400 w-1/2">fsd</div> |
||||
{/* left */} |
||||
<div className="w-1/2 flex flex-col items-center"> |
||||
<div className="w-full flex flex-row items-center justify-between p-4"> |
||||
<div className="flex flex-row items-center justify-between"> |
||||
<span className="text-xs ml-2">Dark</span> <SwitchDesign /> |
||||
</div> |
||||
<p className="text-2xl">The Color System</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
); |
||||
}; |
||||
|
||||
export default ThemeColor; |
||||
|
||||
// <div style={{ background: background }} className="h-screen w-full">
|
||||
// {current != null && <h1>Copied {current}</h1>}
|
||||
// <div className=" flex flex-row item-center justify-center">
|
||||
// {colors.map((color, index) => (
|
||||
// <div key={index} className="card">
|
||||
// <div
|
||||
// style={{ background: color }}
|
||||
// className="box w-20 h-20 rounded p-5 cursor-pointer"
|
||||
// onClick={() => setBackground(color)}
|
||||
// >
|
||||
// fdsfsds
|
||||
// </div>
|
||||
// </div>
|
||||
// ))}
|
||||
// </div>
|
||||
// </div>
|
@ -0,0 +1,41 @@ |
||||
import React from "react"; |
||||
import Button from "../ButtonDesign/Button"; |
||||
|
||||
const ThemeList = ({ items }) => { |
||||
return ( |
||||
<div> |
||||
<section |
||||
className="flex flex-row items-center justify-end gap-4 no-scrollbar tabbar overflow-x-scroll scrolling-touch" |
||||
onMouseDown={(e) => { |
||||
const slider = window.document.querySelector(".tabbar"); |
||||
window.isDown = true; |
||||
window.startX = e.pageX - slider.offsetLeft; |
||||
window.scrollLeft = slider.scrollLeft; |
||||
}} |
||||
onMouseLeave={(e) => { |
||||
window.isDown = false; |
||||
}} |
||||
onMouseUp={(e) => { |
||||
window.isDown = false; |
||||
}} |
||||
onMouseMove={(e) => { |
||||
const slider = window.document.querySelector(".tabbar"); |
||||
if (!window.isDown) return; |
||||
e.preventDefault(); |
||||
const x = e.pageX - slider.offsetLeft; |
||||
const walk = (x - window.startX) * 1; |
||||
slider.scrollLeft = window.scrollLeft - walk; |
||||
}} |
||||
> |
||||
<Button |
||||
text={"Theme Color1"} |
||||
className="bg-[#94A3B8] text-[#374151] font-sansbold rounded-sm px-2 py-0.5" |
||||
/> |
||||
</section> |
||||
</div> |
||||
); |
||||
}; |
||||
|
||||
export default ThemeList; |
||||
|
||||
ThemeList.defaultProps = {}; |
Loading…
Reference in new issue