Files
TheGame/packages/design-system/src/SelectTimeZone.tsx
Alec LaLonde 44c706761c Feature/add timezone frontend (#231)
* 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
2020-12-24 23:28:12 -07:00

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} />
);