mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-05 15:33:59 +00:00
Fix: issue with text colour (#214)
* fix: adjust text colour from context * fix: issue with wrong proptype
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ontime-ui",
|
||||
"version": "1.8.1",
|
||||
"version": "1.8.2",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@chakra-ui/react": "^2.3.2",
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user