Skip to content

Commit

Permalink
style(openAlex): change color button for external actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jerem1508 committed Nov 14, 2024
1 parent 98227f8 commit f46c38e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
8 changes: 4 additions & 4 deletions client/src/components/button-dropdown/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function ButtonDropdown({ className, data, label, searchParams })
return (
<div className={_className}>
<Button
color="beige-gris-galet"
color="blue-ecume"
disabled={!data.length}
icon="save-line"
size="sm"
Expand All @@ -40,22 +40,22 @@ export default function ButtonDropdown({ className, data, label, searchParams })
</Button>
<div className="dropdown-content">
<Button
color="beige-gris-galet"
color="blue-ecume"
onClick={() => { export2Csv({ data, label, searchParams }); toastExport(); }}
size="sm"
>
Export in CSV (minimal data)
</Button>
<Button
color="beige-gris-galet"
color="blue-ecume"
onClick={() => { export2jsonl({ data, label, searchParams }); toastExport(); }}
size="sm"
>
Export in JSONL (complete data)
</Button>
{['publications', 'datasets'].includes(label) && (
<Button
color="beige-gris-galet"
color="blue-ecume"
onClick={() => {
const numberOfLines = export2FosmCsv({ data, label, searchParams });
toastExport(numberOfLines);
Expand Down
15 changes: 9 additions & 6 deletions client/src/pages/openalex-ror/results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
Tag, TagGroup,
Text,
TextInput,
Badge,
} from '@dataesr/dsfr-plus';
import { useQuery } from '@tanstack/react-query';
import { useEffect, useState } from 'react';
Expand Down Expand Up @@ -97,9 +98,9 @@ export default function Affiliations() {
queryParams.deletedAffiliations.push(normalize(item));
}
});
searchParams.getAll('rors')
searchParams.getAll('rors');
setOptions(queryParams);
}
};

getData();
}, [searchParams]);
Expand Down Expand Up @@ -244,12 +245,14 @@ export default function Affiliations() {
</Modal>
<div className="wm-external-actions">
<span className="wm-text fr-mb-3w">
<span>{selectedOpenAlex.length}</span>
{` selected affiliation${selectedOpenAlex.length === 1 ? '' : 's'}`}
<Badge color="brown-opera">{selectedOpenAlex.length}</Badge>
<i>
{` selected affiliation${selectedOpenAlex.length === 1 ? '' : 's'}`}
</i>
</span>
<Button
className="fr-ml-5w fr-mr-1w"
color="beige-gris-galet"
color="blue-ecume"
disabled={!selectedOpenAlex.length}
icon="add-circle-line"
key="add-ror"
Expand All @@ -264,7 +267,7 @@ export default function Affiliations() {
</Button>
<Button
className="fr-mr-1w"
color="beige-gris-galet"
color="blue-ecume"
disabled={!selectedOpenAlex.length}
icon="close-circle-line"
key="remove-ror"
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/openalex-ror/send-feedback-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function ActionsOpenalexFeedback({ allOpenalexCorrections }) {
return (
<>
<Button
color="beige-gris-galet"
color="blue-ecume"
disabled={!allOpenalexCorrections.length > 0}
icon="send-plane-fill"
onClick={switchModal}
Expand Down

0 comments on commit f46c38e

Please sign in to comment.