refactor: clean up settings file for better structure

This commit is contained in:
Siddhant Rai
2024-04-05 23:33:27 +05:30
parent 0dc7333563
commit 0a5832ec75
10 changed files with 930 additions and 1000 deletions

View File

@@ -1,4 +1,4 @@
import { useState } from 'react';
import React from 'react';
import Arrow2 from '../assets/dropdown-arrow.svg';
import Edit from '../assets/edit.svg';
import Trash from '../assets/trash.svg';
@@ -34,7 +34,7 @@ function Dropdown({
className?: string;
width?: string;
}) {
const [isOpen, setIsOpen] = useState(false);
const [isOpen, setIsOpen] = React.useState(false);
return (
<div
className={[
@@ -46,7 +46,7 @@ function Dropdown({
>
<button
onClick={() => setIsOpen(!isOpen)}
className={`flex w-full cursor-pointer items-center justify-between border-2 border-silver bg-white px-5 py-3 dark:border-chinese-silver dark:bg-transparent ${
className={`flex w-full cursor-pointer items-center justify-between border-2 bg-white px-5 py-3 dark:border-chinese-silver dark:bg-transparent ${
isOpen ? `rounded-t-${rounded}` : `rounded-${rounded}`
}`}
>