mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 05:34:09 +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",
|
"name": "ontime-ui",
|
||||||
"version": "1.8.1",
|
"version": "1.8.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/react": "^2.3.2",
|
"@chakra-ui/react": "^2.3.2",
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ TableHeader.propTypes = {
|
|||||||
featureData: PropTypes.shape({
|
featureData: PropTypes.shape({
|
||||||
playback: PropTypes.string,
|
playback: PropTypes.string,
|
||||||
selectedEventId: PropTypes.string,
|
selectedEventId: PropTypes.string,
|
||||||
selectedEventIndex: PropTypes.string,
|
selectedEventIndex: PropTypes.number,
|
||||||
numEvents: PropTypes.number,
|
numEvents: PropTypes.number,
|
||||||
titleNow: PropTypes.string,
|
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 PropTypes from 'prop-types';
|
||||||
|
|
||||||
import { AutoTextArea } from '../../../common/components/input/AutoTextArea';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shamelessly copied from react-table docs
|
* Shamelessly copied from react-table docs
|
||||||
* Plugged into chakra-ui editable component
|
* Plugged into chakra-ui editable component
|
||||||
@@ -18,6 +18,7 @@ export default function EditableCell(props) {
|
|||||||
column: { id },
|
column: { id },
|
||||||
handleUpdate,
|
handleUpdate,
|
||||||
} = props;
|
} = props;
|
||||||
|
const { theme } = useContext(TableSettingsContext);
|
||||||
|
|
||||||
// We need to keep and update the state of the cell normally
|
// We need to keep and update the state of the cell normally
|
||||||
const [value, setValue] = useState(initialValue);
|
const [value, setValue] = useState(initialValue);
|
||||||
@@ -43,6 +44,7 @@ return (
|
|||||||
rows={3}
|
rows={3}
|
||||||
transition='none'
|
transition='none'
|
||||||
spellCheck={false}
|
spellCheck={false}
|
||||||
|
color={theme === "dark" ? "#fffffa" : "black"}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ontime",
|
"name": "ontime",
|
||||||
"version": "1.8.1",
|
"version": "1.8.2",
|
||||||
"author": "Carlos Valente",
|
"author": "Carlos Valente",
|
||||||
"description": "Time keeping for live events",
|
"description": "Time keeping for live events",
|
||||||
"repository": "https://github.com/cpvalente/ontime",
|
"repository": "https://github.com/cpvalente/ontime",
|
||||||
|
|||||||
Reference in New Issue
Block a user