* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
import styled from '@emotion/styled';
+import { ButtonGroup } from '@sonarsource/echoes-react';
import tw from 'twin.macro';
import { Spinner } from '../Spinner';
secondaryButton: React.ReactNode;
}
-export function ModalFooter({ loading = false, primaryButton, secondaryButton }: Props) {
+export function ModalFooter({ loading = false, primaryButton, secondaryButton }: Readonly<Props>) {
return (
<StyledFooter>
<Spinner loading={loading} />
- {primaryButton}
- {secondaryButton}
+
+ <ButtonGroup>
+ {primaryButton}
+ {secondaryButton}
+ </ButtonGroup>
</StyledFooter>
);
}
border-radius: 625rem;
}
+.emotion-4 {
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ gap: var(--echoes-dimension-space-100);
+}
+
<div>
<div
class="emotion-0 emotion-1"
/>
</div>
</div>
- <button
- type="button"
- >
- Primary
- </button>
- <button
- type="reset"
+ <span
+ class="emotion-4 emotion-5"
>
- Reset
- </button>
+ <button
+ type="button"
+ >
+ Primary
+ </button>
+ <button
+ type="reset"
+ >
+ Reset
+ </button>
+ </span>
</div>
</div>
`;
border-radius: 625rem;
}
+.emotion-4 {
+ -webkit-align-items: center;
+ -webkit-box-align: center;
+ -ms-flex-align: center;
+ align-items: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ gap: var(--echoes-dimension-space-100);
+}
+
<div>
<div
class="emotion-0 emotion-1"
/>
</div>
</div>
- <button
- type="button"
+ <span
+ class="emotion-4 emotion-5"
>
- Close
- </button>
+ <button
+ type="button"
+ >
+ Close
+ </button>
+ </span>
</div>
</div>
`;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+
+import { ButtonGroup } from '@sonarsource/echoes-react';
import { InputSearch, LightLabel, LightPrimary } from 'design-system';
import * as React from 'react';
import { RawQuery } from '~sonar-aligned/types/router';
const MIN_SEARCH_QUERY_LENGTH = 2;
-export default function PageHeader(props: Props) {
+export default function PageHeader(props: Readonly<Props>) {
const { query, total, currentUser, view } = props;
const defaultOption = isLoggedIn(currentUser) ? 'name' : 'analysis_date';
return (
<div className="it__page-header sw-flex sw-flex-col">
<div className="sw-flex sw-justify-end sw-mb-4">
- <ProjectCreationMenu />
- <ApplicationCreation className="sw-ml-2" />
+ <ButtonGroup>
+ <ProjectCreationMenu />
+
+ <ApplicationCreation />
+ </ButtonGroup>
</div>
+
<div className="sw-flex sw-justify-between">
<div className="sw-flex sw-flex-1">
<Tooltip content={translate('projects.search')}>
searchInputAriaLabel={translate('search_verb')}
/>
</Tooltip>
+
<PerspectiveSelect onChange={props.onPerspectiveChange} view={view} />
+
<ProjectsSortingSelect
defaultOption={defaultOption}
onChange={props.onSortChange}
view={view}
/>
</div>
+
<div className="sw-flex sw-items-center">
{total != null && (
<>
<LightPrimary id="projects-total" className="sw-body-sm-highlight sw-mr-1">
{total}
</LightPrimary>
+
<LightLabel className="sw-body-sm">{translate('projects_')}</LightLabel>
</>
)}
+
<HomePageSelect currentPage={{ type: 'PROJECTS' }} />
</div>
</div>