mirror of
https://github.com/myfatemi04/wheelshare-frontend.git
synced 2025-04-21 11:20:17 -04:00
change labels for availability
This commit is contained in:
parent
a48e6eff91
commit
d3805dcaa1
|
@ -1,22 +1,17 @@
|
||||||
import { CSSProperties } from '@material-ui/styles';
|
import { CSSProperties } from '@material-ui/styles';
|
||||||
import { MouseEventHandler, useCallback, useState } from 'react';
|
import { MouseEventHandler, useCallback, useState } from 'react';
|
||||||
|
|
||||||
export type AvailabilityKind =
|
export type AvailabilityKind = 'going' | 'interested' | 'not-interested';
|
||||||
| 'going/can-bring-someone'
|
|
||||||
| 'going/cannot-bring-someone'
|
|
||||||
| 'interested'
|
|
||||||
| 'not-interested';
|
|
||||||
|
|
||||||
const availabilityNames: Record<AvailabilityKind, string> = {
|
const availabilityNames: Record<AvailabilityKind, string> = {
|
||||||
'going/can-bring-someone': 'Going; Can bring someone',
|
going: 'Going',
|
||||||
'going/cannot-bring-someone': "Going; Can't bring someone",
|
|
||||||
interested: 'Interested',
|
interested: 'Interested',
|
||||||
'not-interested': 'Not interested',
|
'not-interested': 'Not interested',
|
||||||
};
|
};
|
||||||
|
|
||||||
const optionStyle: CSSProperties = {
|
const optionStyle: CSSProperties = {
|
||||||
height: '3rem',
|
height: '3rem',
|
||||||
backgroundColor: 'white',
|
backgroundColor: '#e0e0e0',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
|
@ -26,6 +21,7 @@ const optionStyle: CSSProperties = {
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
|
textTransform: 'uppercase',
|
||||||
};
|
};
|
||||||
|
|
||||||
const selectedOptionStyle = {
|
const selectedOptionStyle = {
|
||||||
|
@ -79,7 +75,6 @@ export default function Availability({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
borderRadius: '0.5rem',
|
borderRadius: '0.5rem',
|
||||||
border: '1px solid lightgrey',
|
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
marginTop: '1rem',
|
marginTop: '1rem',
|
||||||
marginBottom: '1rem',
|
marginBottom: '1rem',
|
||||||
|
@ -89,16 +84,7 @@ export default function Availability({
|
||||||
>
|
>
|
||||||
{focused ? (
|
{focused ? (
|
||||||
<>
|
<>
|
||||||
<Option
|
<Option bind="going" current={selected} onSelected={onSelected} />
|
||||||
bind="going/can-bring-someone"
|
|
||||||
current={selected}
|
|
||||||
onSelected={onSelected}
|
|
||||||
/>
|
|
||||||
<Option
|
|
||||||
bind="going/cannot-bring-someone"
|
|
||||||
current={selected}
|
|
||||||
onSelected={onSelected}
|
|
||||||
/>
|
|
||||||
<Option
|
<Option
|
||||||
bind="interested"
|
bind="interested"
|
||||||
current={selected}
|
current={selected}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user