Skip to content

Commit 6c44d75

Browse files
committed
upgraded UI
1 parent 34de163 commit 6c44d75

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎src/components/Canvas/AlgorithmSelection.js‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,48 +37,48 @@ function AlgorithmSelection({strategy, options}) {
3737

3838
{/* Dropdown menu */}
3939
<div className={`transition-all duration-200 ease-in-out absolute h-[fit w-[10em] dark:bg-gray-600 bg-gray-500 top-[3.5em] rounded-md z-20 ${showDropdown ? "scale-100" : "scale-[0] top-[-2em]"} `}>
40-
<div className={`${currentAlgo === 'Radix' && 'bg-gray-200'} cursor-pointer w-full dark:hover:bg-gray-700 hover:bg-gray-600 rounded-t-md font-semibold text-white h-[3em] flex items-center justify-start pl-5`}
40+
<div className={`${currentAlgo === 'Radix' && 'bg-gray-200'} group cursor-pointer w-full dark:hover:bg-gray-700 hover:bg-gray-600 rounded-t-md font-semibold text-white h-[3em] flex items-center justify-start pl-5`}
4141
onClick={() => {
4242
setCurrentAlgo('Radix');
4343
options.setState({algorithm: "Radix"});
4444
strategy.setStrategy = Radix;
4545
setShowDropdown(!showDropdown)
4646
}}
47-
>
48-
<p className={`${currentAlgo === 'Radix' && 'text-black'}`}>Radix Sort</p>
47+
>
48+
<p className={`${currentAlgo === 'Radix' && 'text-black group-hover:text-white'}`}>Radix Sort</p>
4949
</div>
5050

51-
<div className={`${currentAlgo === 'Merge' && 'bg-gray-200'} cursor-pointer w-full hover:bg-gray-700 font-semibold text-white h-[3em] flex items-center justify-start pl-5`}
51+
<div className={`${currentAlgo === 'Merge' && 'bg-gray-200'} group cursor-pointer w-full hover:bg-gray-700 font-semibold text-white h-[3em] flex items-center justify-start pl-5`}
5252
onClick={() => {
5353
setCurrentAlgo('Merge');
5454
options.setState({algorithm: "Merge"});
5555
strategy.setStrategy = Merge;
5656
setShowDropdown(!showDropdown)
5757
}}
5858
>
59-
<p className={`${currentAlgo === 'Merge' && 'text-black'}`}>Merge Sort</p>
59+
<p className={`${currentAlgo === 'Merge' && 'text-black group-hover:text-white'}`}>Merge Sort</p>
6060

6161
</div>
62-
<div className={`${currentAlgo === 'Selection' && 'bg-gray-200'} cursor-pointer w-full hover:bg-gray-700 font-semibold text-white h-[3em] flex items-center justify-start pl-5`}
62+
<div className={`${currentAlgo === 'Selection' && 'bg-gray-200'} group cursor-pointer w-full hover:bg-gray-700 font-semibold text-white h-[3em] flex items-center justify-start pl-5`}
6363
onClick={() => {
6464
setCurrentAlgo('Selection');
6565
options.setState({algorithm: "Selection"});
6666
strategy.setStrategy = Selection;
6767
setShowDropdown(!showDropdown)
6868
}}
6969
>
70-
<p className={`${currentAlgo === 'Selection' && 'text-black'}`}>Selection Sort</p>
70+
<p className={`${currentAlgo === 'Selection' && 'text-black group-hover:text-white'}`}>Selection Sort</p>
7171

7272
</div>
73-
<div className={`${currentAlgo === 'Quick' && 'bg-gray-200'} cursor-pointer w-full hover:bg-gray-700 rounded-b-md font-semibold text-white h-[3em] flex items-center justify-start pl-5`}
73+
<div className={`${currentAlgo === 'Quick' && 'bg-gray-200'} group cursor-pointer w-full hover:bg-gray-700 rounded-b-md font-semibold text-white h-[3em] flex items-center justify-start pl-5`}
7474
onClick={() => {
7575
setCurrentAlgo('Quick');
7676
options.setState({algorithm: "Quick"});
7777
strategy.setStrategy = Selection;
7878
setShowDropdown(!showDropdown)
7979
}}
8080
>
81-
<p className={`${currentAlgo === 'Quick' && 'text-black'}`}>Quick Sort</p>
81+
<p className={`${currentAlgo === 'Quick' && 'text-black group-hover:text-white'}`}>Quick Sort</p>
8282
</div>
8383
</div>
8484
</div>

‎src/components/Canvas/InputField.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class InputField extends Component {
5050
/>
5151
<button onClick={() => {
5252
this.props.InputHandler.setState({generatedArray: InputHandler.handleInputRequest(inputArrayLength)});
53-
}} className="bg-blue-300 p-[.7em] md:p-2 ml-3 rounded-md text-white font-semibold hover:scale-[1.02] hover:bg-blue-400 transition duration-200 ease-in-out dark:bg-lightBlue dark:text-darkGray">Generate Array</button>
53+
}} className="bg-blue-300 p-[.7em] ml-3 rounded-md text-white font-semibold hover:scale-[1.02] hover:bg-blue-400 transition duration-200 ease-in-out dark:bg-lightBlue dark:text-darkGray">Generate Array</button>
5454
</div>
5555
</div>
5656

0 commit comments

Comments
 (0)