Spaces:
Running
Running
Commit ·
32cff2f
1
Parent(s): 87bd3e8
style(ui): align config dropdowns equidistantly and add padding before arrows
Browse files- frontend-next/app/page.tsx +48 -41
frontend-next/app/page.tsx
CHANGED
|
@@ -267,8 +267,8 @@ const CustomDropdown = ({ label, options, value, onChange }: { label: string, op
|
|
| 267 |
onMouseOver={e => e.currentTarget.style.borderColor = 'rgba(0, 240, 255, 0.4)'}
|
| 268 |
onMouseOut={e => e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.1)'}
|
| 269 |
>
|
| 270 |
-
{selectedOption.label}
|
| 271 |
-
<motion.div animate={{ rotate: isOpen ? 180 : 0 }} style={{ display: 'flex' }}>
|
| 272 |
<ArrowDown size={14} opacity={0.5} />
|
| 273 |
</motion.div>
|
| 274 |
</div>
|
|
@@ -845,50 +845,57 @@ export default function App() {
|
|
| 845 |
borderRadius: '16px',
|
| 846 |
display: 'flex',
|
| 847 |
gap: '16px',
|
|
|
|
| 848 |
flexWrap: 'wrap',
|
| 849 |
marginBottom: '12px',
|
| 850 |
boxShadow: '0 10px 40px rgba(0,0,0,0.5)'
|
| 851 |
}}
|
| 852 |
>
|
| 853 |
-
<
|
| 854 |
-
|
| 855 |
-
|
| 856 |
-
|
| 857 |
-
|
| 858 |
-
{
|
| 859 |
-
|
| 860 |
-
|
| 861 |
-
|
| 862 |
-
|
| 863 |
-
|
| 864 |
-
<
|
| 865 |
-
|
| 866 |
-
|
| 867 |
-
|
| 868 |
-
|
| 869 |
-
|
| 870 |
-
{
|
| 871 |
-
{
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
|
| 875 |
-
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
|
| 879 |
-
|
| 880 |
-
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
| 884 |
-
|
| 885 |
-
|
| 886 |
-
|
| 887 |
-
{
|
| 888 |
-
{
|
| 889 |
-
|
| 890 |
-
|
| 891 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 892 |
</motion.div>
|
| 893 |
)}
|
| 894 |
</AnimatePresence>
|
|
|
|
| 267 |
onMouseOver={e => e.currentTarget.style.borderColor = 'rgba(0, 240, 255, 0.4)'}
|
| 268 |
onMouseOut={e => e.currentTarget.style.borderColor = 'rgba(255, 255, 255, 0.1)'}
|
| 269 |
>
|
| 270 |
+
<span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{selectedOption.label}</span>
|
| 271 |
+
<motion.div animate={{ rotate: isOpen ? 180 : 0 }} style={{ display: 'flex', marginLeft: '20px' }}>
|
| 272 |
<ArrowDown size={14} opacity={0.5} />
|
| 273 |
</motion.div>
|
| 274 |
</div>
|
|
|
|
| 845 |
borderRadius: '16px',
|
| 846 |
display: 'flex',
|
| 847 |
gap: '16px',
|
| 848 |
+
justifyContent: 'space-between',
|
| 849 |
flexWrap: 'wrap',
|
| 850 |
marginBottom: '12px',
|
| 851 |
boxShadow: '0 10px 40px rgba(0,0,0,0.5)'
|
| 852 |
}}
|
| 853 |
>
|
| 854 |
+
<div style={{ flex: 1, minWidth: '160px' }}>
|
| 855 |
+
<CustomDropdown
|
| 856 |
+
label="RETRIEVAL DEPTH"
|
| 857 |
+
value={topK}
|
| 858 |
+
onChange={setTopK}
|
| 859 |
+
options={[
|
| 860 |
+
{ value: 3, label: 'Fast (3 Papers)' },
|
| 861 |
+
{ value: 5, label: 'Balanced (5 Papers)' },
|
| 862 |
+
{ value: 10, label: 'Deep (10 Papers)' }
|
| 863 |
+
]}
|
| 864 |
+
/>
|
| 865 |
+
</div>
|
| 866 |
+
|
| 867 |
+
<div style={{ flex: 1, minWidth: '160px' }}>
|
| 868 |
+
<CustomDropdown
|
| 869 |
+
label="RESEARCH DOMAIN"
|
| 870 |
+
value={category}
|
| 871 |
+
onChange={setCategory}
|
| 872 |
+
options={[
|
| 873 |
+
{ value: 'All', label: 'Global Search' },
|
| 874 |
+
{ value: 'cs.LG', label: 'cs.LG (Machine Learning)' },
|
| 875 |
+
{ value: 'cs.AI', label: 'cs.AI (Artificial Intelligence)' },
|
| 876 |
+
{ value: 'stat.ML', label: 'stat.ML (ML Stats)' },
|
| 877 |
+
{ value: 'cs.CL', label: 'cs.CL (NLP/Language)' },
|
| 878 |
+
{ value: 'cs.CV', label: 'cs.CV (Vision)' },
|
| 879 |
+
{ value: 'cs.RO', label: 'cs.RO (Robotics)' }
|
| 880 |
+
]}
|
| 881 |
+
/>
|
| 882 |
+
</div>
|
| 883 |
+
|
| 884 |
+
<div style={{ flex: 1, minWidth: '160px' }}>
|
| 885 |
+
<CustomDropdown
|
| 886 |
+
label="RECENCY FILTER"
|
| 887 |
+
value={filterYear}
|
| 888 |
+
onChange={setFilterYear}
|
| 889 |
+
options={[
|
| 890 |
+
{ value: 'All', label: 'Legacy & Modern' },
|
| 891 |
+
{ value: '2024', label: '2024 (Latest)' },
|
| 892 |
+
{ value: '2023', label: '2023+' },
|
| 893 |
+
{ value: '2022', label: '2022+' },
|
| 894 |
+
{ value: '2021', label: '2021+' },
|
| 895 |
+
{ value: '2020', label: '2020+' }
|
| 896 |
+
]}
|
| 897 |
+
/>
|
| 898 |
+
</div>
|
| 899 |
</motion.div>
|
| 900 |
)}
|
| 901 |
</AnimatePresence>
|