Skip to content

Commit 7d0e96d

Browse files
authored
Clustal button: remove CSS variable and use JS theme state (#1512)
1 parent 680f48d commit 7d0e96d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/libs/web-common/src/components/records/ClustalAlignmentForm.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useRef, useState, FormEvent } from 'react';
22
import { Dialog } from '@veupathdb/wdk-client/lib/Components';
33
import Banner from '@veupathdb/coreui/lib/components/banners/Banner';
4+
import useUITheme from '@veupathdb/coreui/lib/components/theming/useUITheme';
45

56
interface ClustalAlignmentFormProps {
67
action: string;
@@ -22,6 +23,7 @@ export default function ClustalAlignmentForm({
2223
warnThreshold,
2324
blockThreshold,
2425
}: ClustalAlignmentFormProps) {
26+
const theme = useUITheme();
2527
const [showModal, setShowModal] = useState(false);
2628
const [evaluatedWarnThreshold, setEvaluatedWarnThreshold] =
2729
useState<number | null>(null);
@@ -156,7 +158,9 @@ export default function ClustalAlignmentForm({
156158
className="btn"
157159
onClick={handleConfirm}
158160
style={{
159-
backgroundColor: 'var(--coreui-color-primary)',
161+
backgroundColor: theme
162+
? theme.palette.primary.hue[theme.palette.primary.level]
163+
: '#4D4D4D',
160164
color: 'white',
161165
fontWeight: 600,
162166
}}

0 commit comments

Comments
 (0)