mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
* Added tz column * Updated hasura permissions on new table * Added new dependencies for working with timezones * Added SetupTimeZone component * Bumped spacetime-informal to use their types * Extracted timezone computation into helper, added useMemo hook * Re-added spacetime types
46 lines
1.0 KiB
TypeScript
46 lines
1.0 KiB
TypeScript
import React from 'react';
|
|
import { Styles } from 'react-select';
|
|
import TimezoneSelect, { TimezoneSelectProps } from 'react-timezone-select';
|
|
|
|
import { theme } from './theme';
|
|
|
|
export const selectStyles: Styles = {
|
|
menu: (styles) => ({
|
|
...styles,
|
|
background: theme.colors.dark,
|
|
}),
|
|
input: (styles) => ({
|
|
...styles,
|
|
color: theme.colors.white,
|
|
}),
|
|
option: (styles) => ({
|
|
...styles,
|
|
background: theme.colors.dark,
|
|
':hover': {
|
|
backgroundColor: theme.colors.purpleTag,
|
|
color: theme.colors.white,
|
|
},
|
|
}),
|
|
control: (styles) => ({
|
|
...styles,
|
|
background: theme.colors.dark,
|
|
border: theme.colors.dark,
|
|
}),
|
|
singleValue: (styles) => ({
|
|
...styles,
|
|
color: theme.colors.white,
|
|
}),
|
|
dropdownIndicator: (styles) => ({
|
|
...styles,
|
|
color: theme.colors.white,
|
|
cursor: 'pointer',
|
|
':hover': {
|
|
color: theme.colors.blueLight,
|
|
},
|
|
}),
|
|
};
|
|
|
|
export const SelectTimeZone: React.FC<TimezoneSelectProps> = (props) => (
|
|
<TimezoneSelect styles={selectStyles} {...props} />
|
|
);
|