Add a component for toolbar buttons with a dropdown, consolidate Constrain actions under one (#2327)

This commit is contained in:
Frank Noirot
2024-05-10 19:02:11 -04:00
committed by GitHub
parent d0f9ae475f
commit 726fd02bad
36 changed files with 238 additions and 121 deletions

View File

@ -210,7 +210,7 @@ const Home = () => {
: '')
}
onClick={() => setSearchParams(getNextSearchParams(sort, 'name'))}
icon={{
iconStart={{
icon: getSortIcon(sort, 'name'),
className: 'p-1.5',
iconClassName: !sort.includes('name')
@ -232,7 +232,7 @@ const Home = () => {
onClick={() =>
setSearchParams(getNextSearchParams(sort, 'modified'))
}
icon={{
iconStart={{
icon: sort ? getSortIcon(sort, 'modified') : faArrowDown,
className: 'p-1.5',
iconClassName: !isSortByModified ? '!text-chalkboard-40' : '',
@ -278,7 +278,7 @@ const Home = () => {
<ActionButton
Element="button"
onClick={() => send('Create project')}
icon={{ icon: faPlus, iconClassName: 'p-1 w-4' }}
iconStart={{ icon: faPlus, iconClassName: 'p-1 w-4' }}
data-testid="home-new-file"
>
New project