Fix: issue with text colour (#214)

* fix: adjust text colour from context
* fix: issue with wrong proptype
This commit is contained in:
Carlos Valente
2022-10-12 20:13:30 +02:00
committed by GitHub
parent f119fb4529
commit 723b1cfa48
4 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime-ui",
"version": "1.8.1",
"version": "1.8.2",
"private": true,
"dependencies": {
"@chakra-ui/react": "^2.3.2",
+1 -1
View File
@@ -102,7 +102,7 @@ TableHeader.propTypes = {
featureData: PropTypes.shape({
playback: PropTypes.string,
selectedEventId: PropTypes.string,
selectedEventIndex: PropTypes.string,
selectedEventIndex: PropTypes.number,
numEvents: PropTypes.number,
titleNow: PropTypes.string,
}),
@@ -1,8 +1,8 @@
import { useCallback, useEffect, useState } from 'react';
import { useCallback, useContext, useEffect, useState } from 'react';
import { AutoTextArea } from 'common/components/input/AutoTextArea';
import { TableSettingsContext } from 'common/context/TableSettingsContext';
import PropTypes from 'prop-types';
import { AutoTextArea } from '../../../common/components/input/AutoTextArea';
/**
* Shamelessly copied from react-table docs
* Plugged into chakra-ui editable component
@@ -18,6 +18,7 @@ export default function EditableCell(props) {
column: { id },
handleUpdate,
} = props;
const { theme } = useContext(TableSettingsContext);
// We need to keep and update the state of the cell normally
const [value, setValue] = useState(initialValue);
@@ -43,6 +44,7 @@ return (
rows={3}
transition='none'
spellCheck={false}
color={theme === "dark" ? "#fffffa" : "black"}
/>
);
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ontime",
"version": "1.8.1",
"version": "1.8.2",
"author": "Carlos Valente",
"description": "Time keeping for live events",
"repository": "https://github.com/cpvalente/ontime",