Skip to content

Commit

Permalink
Fixing prettier issues
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte committed Jun 21, 2024
1 parent 6173ff2 commit 10d6a21
Show file tree
Hide file tree
Showing 21 changed files with 257 additions and 275 deletions.
4 changes: 2 additions & 2 deletions common/components/alerts/AlertNotice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export const AlertNotice: React.FC = () => {
return (
<>
<div
className="pb-safe fixed bottom-24 right-2 z-10 cursor-pointer md:right-4 lg:bottom-4"
className="pb-safe fixed bottom-24 right-2 z-10 cursor-pointer md:right-4 lg:bottom-4"
onClick={() => setAlertsOpen(!alertsOpen)}
title="Alerts"
>
<p className="text-4xl md:text-5xl " style={{ fontFamily: 'Helvetica Neue' }}>
<p className="text-4xl md:text-5xl" style={{ fontFamily: 'Helvetica Neue' }}>
⚠️
</p>
</div>
Expand Down
6 changes: 3 additions & 3 deletions common/components/alerts/PastAlertModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const PastAlertModal: React.FC<PastAlertModalProps> = ({ alertsOpen, setA
<div className="flex flex-col items-center text-lg">
<p
style={{ fontFamily: 'Helvetica Neue' }}
className="text-5xl text-yellow-300 "
className="text-5xl text-yellow-300"
>
⚠️
</p>
Expand All @@ -54,8 +54,8 @@ export const PastAlertModal: React.FC<PastAlertModalProps> = ({ alertsOpen, setA
<div
key={index}
className={classNames(
alert.applied ? 'bg-yellow-200' : 'bg-yellow-100 ',
'flex cursor-pointer flex-col rounded-md border border-yellow-200 bg-yellow-100 p-2 shadow-sm hover:bg-yellow-200 '
alert.applied ? 'bg-yellow-200' : 'bg-yellow-100',
'flex cursor-pointer flex-col rounded-md border border-yellow-200 bg-yellow-100 p-2 shadow-sm hover:bg-yellow-200'
)}
onClick={() => {
alertStore.changeAlertApplied(alertStore.alerts, index);
Expand Down
4 changes: 2 additions & 2 deletions common/components/buttons/DonateButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const DonateButton: React.FC = () => {
onMouseLeave={() => setHovered(false)}
className="rounded-mdring-white group flex w-full cursor-pointer justify-start gap-x-2 rounded-md bg-tm-red hover:bg-white focus:outline-none focus:ring-1 md:justify-start"
>
<div className="relative flex flex-row items-center gap-2 pl-1 text-sm text-stone-100">
<div className="group flex h-8 w-8 items-center justify-center rounded-full ">
<div className="relative flex flex-row items-center gap-2 pl-1 text-sm text-stone-100">
<div className="group flex h-8 w-8 items-center justify-center rounded-full">
<FontAwesomeIcon icon={faHeartSolid} size="lg" className="group-hover:text-tm-red" />
</div>
<p className="group-hover:text-tm-red">Make a donation</p>
Expand Down
2 changes: 1 addition & 1 deletion common/components/charts/AggregateLineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const AggregateLineChart: React.FC<AggregateLineProps> = ({
]}
/>
</ChartDiv>
<div className="flex flex-row items-end gap-4 ">
<div className="flex flex-row items-end gap-4">
{showLegend && <LegendLongTerm />}
{startDate && (
<DownloadButton
Expand Down
2 changes: 1 addition & 1 deletion common/components/charts/CarouselGraphDiv.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ interface CarouselGraphDivProps {
}

export const CarouselGraphDiv: React.FC<CarouselGraphDivProps> = ({ children }) => {
return <div className="flex flex-col gap-y-1 pt-2 ">{children}</div>;
return <div className="flex flex-col gap-y-1 pt-2">{children}</div>;
};
2 changes: 1 addition & 1 deletion common/components/charts/Legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const LegendSingleDay: React.FC<LegendProps> = ({ showUnderRatio = false
<div className="flex w-full flex-col rounded-md border border-stone-100 text-stone-700 shadow-sm">
<Disclosure.Button className="">
<div className="flex flex-row items-center justify-between px-4 py-1">
<p className="text-xs italic ">Legend</p>
<p className="text-xs italic">Legend</p>
<FontAwesomeIcon icon={open ? faChevronUp : faChevronDown} className="" />
</div>
</Disclosure.Button>
Expand Down
2 changes: 1 addition & 1 deletion common/components/charts/SingleDayLineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export const SingleDayLineChart: React.FC<SingleDayLineProps> = ({
</ChartDiv>
<div className="flex flex-col">
{alerts && <AlertsDisclaimer alerts={alerts} />}
<div className="flex flex-row items-end gap-4 ">
<div className="flex flex-row items-end gap-4">
{showLegend && benchmarkField ? (
<LegendSingleDay showUnderRatio={showUnderRatio} />
) : (
Expand Down
2 changes: 1 addition & 1 deletion common/components/controls/MobileControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const MobileControlPanel: React.FC<MobileControlPanelProps> = ({
</div>
<div
className={classNames(
'flex flex-row items-center justify-center ',
'flex flex-row items-center justify-center',
lineColorBackground[line ?? 'DEFAULT']
)}
>
Expand Down
2 changes: 1 addition & 1 deletion common/components/general/AlertsDisclaimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const AlertsDisclaimer: React.FC<AlertsDisclaimerProps> = ({ alerts }) =>
<div>
{alerts?.map((alert, index) => (
<div key={index} className="flex flex-row items-baseline gap-1 p-1">
<p className="text-sm text-stone-800">
<p className="text-sm text-stone-800">
<span style={{ fontFamily: 'Helvetica Neue' }}>⚠️ </span>
<span className="font-bold italic">
{getDateString(alert.valid_from, alert.valid_to)}
Expand Down
2 changes: 1 addition & 1 deletion common/components/general/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const ButtonGroup: <T extends string, K extends string>(
? `${lineColorBackground[line ?? 'DEFAULT']} text-white hover:bg-opacity-90`
: `hover:${
lineColorBackground[line ?? 'DEFAULT']
} bg-white text-stone-900 hover:bg-opacity-70 `
} bg-white text-stone-900 hover:bg-opacity-70`
)}
>
<p className="leading-none">{option[1]}</p>
Expand Down
2 changes: 1 addition & 1 deletion common/components/inputs/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Button: React.FC<ButtonProps> = ({ children, additionalClasses, ...
<button
type="button"
className={classNames(
'flex items-center self-stretch rounded-md border px-3 py-1 text-sm font-medium text-white text-opacity-90 shadow-sm hover:bg-opacity-70 focus:bg-opacity-0 focus:outline-none',
'flex items-center self-stretch rounded-md border px-3 py-1 text-sm font-medium text-white text-opacity-90 shadow-sm hover:bg-opacity-70 focus:bg-opacity-0 focus:outline-none',
line && buttonHighlightFocus[line],
line && lineColorDarkBackground[line],
line && lineColorLightBorder[line],
Expand Down
2 changes: 1 addition & 1 deletion common/components/inputs/DateSelection/DateSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const DateSelection: React.FC<DateSelectionProps> = ({ type = 'combo' })
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"
>
<Popover.Panel className="fixed bottom-[5.25rem] left-4 origin-bottom-left overflow-visible rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none md:bottom-auto md:left-auto md:right-auto md:top-auto md:mt-9 md:origin-top-left">
<Popover.Panel className="fixed bottom-[5.25rem] left-4 origin-bottom-left overflow-visible rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none md:bottom-auto md:left-auto md:right-auto md:top-auto md:mt-9 md:origin-top-left">
{({ close }) => (
<div className="flex w-screen max-w-[160px] flex-col overflow-hidden rounded-md bg-white leading-6 shadow-lg ring-1 ring-gray-900/5">
{type === 'combo' && <RangeSelectionTab range={range} setRange={setRange} />}
Expand Down
2 changes: 1 addition & 1 deletion common/components/inputs/DateSelection/RangeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const RangeButton: React.FC<RangeButtonProps> = ({ children, ...props })
type="button"
title="Range"
className={classNames(
'inline-flex items-center self-stretch border-l bg-white bg-opacity-50 px-3 py-1 text-sm font-medium text-white text-opacity-90 shadow-sm hover:bg-opacity-100 focus:bg-opacity-100 focus:outline-none ',
'inline-flex items-center self-stretch border-l bg-white bg-opacity-50 px-3 py-1 text-sm font-medium text-white text-opacity-90 shadow-sm hover:bg-opacity-100 focus:bg-opacity-100 focus:outline-none',
line && buttonHighlightFocus[line],
lineColorDarkBorder[line ?? 'DEFAULT']
)}
Expand Down
2 changes: 1 addition & 1 deletion common/components/inputs/StationSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const StationSelector: React.FC<StationSelector> = ({
leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95"
>
<Listbox.Options className="md:max-w-screen absolute bottom-8 left-0 right-0 top-auto m-auto max-h-[60vh] max-w-xs overflow-auto rounded-md border border-stone-200 bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none md:bottom-auto md:left-auto md:right-auto md:top-auto md:mt-1 md:max-h-[66vh] md:-translate-x-1/2 md:border-none">
<Listbox.Options className="md:max-w-screen absolute bottom-8 left-0 right-0 top-auto m-auto max-h-[60vh] max-w-xs overflow-auto rounded-md border border-stone-200 bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none md:bottom-auto md:left-auto md:right-auto md:top-auto md:mt-1 md:max-h-[66vh] md:-translate-x-1/2 md:border-none">
<div className="py-1">
{stationOptions?.map((station, stationIndex) => (
<Listbox.Option
Expand Down
2 changes: 1 addition & 1 deletion common/components/nav/BusDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const BusDropdown: React.FC<BusDropdownProps> = ({ close }) => {
<BusRouteSelection />
<div
className={
'flex flex-col gap-[2px] rounded-b-md border border-t-0 border-mbta-bus border-opacity-50 bg-neutral-800 px-1 py-[4px]'
'flex flex-col gap-[2px] rounded-b-md border border-t-0 border-mbta-bus border-opacity-50 bg-neutral-800 px-1 py-[4px]'
}
role={'navigation'}
>
Expand Down
4 changes: 2 additions & 2 deletions common/components/nav/BusRouteSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export const BusRouteSelection: React.FC = () => {
>
<div className="relative text-white text-opacity-95">
<Listbox.Button className="relative w-full cursor-pointer border border-mbta-bus bg-tm-lightGrey py-2 pl-3 pr-10 text-left focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm">
<span className="block truncate ">{selected}</span>
<span className="block truncate">{selected}</span>
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon className="h-5 w-5 " aria-hidden="true" />
<ChevronUpDownIcon className="h-5 w-5" aria-hidden="true" />
</span>
</Listbox.Button>
<Transition
Expand Down
6 changes: 2 additions & 4 deletions common/components/nav/CommuterRailRouteSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ export const CommuterRailRouteSelection: React.FC = () => {
>
<div className="relative text-white text-opacity-95">
<Listbox.Button className="relative w-full cursor-pointer border border-mbta-commuterRail bg-tm-lightGrey py-2 pl-3 pr-10 text-left focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white/75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm">
<span className="block truncate ">
{selected && COMMUTER_RAIL_LINE_NAMES[selected]}
</span>
<span className="block truncate">{selected && COMMUTER_RAIL_LINE_NAMES[selected]}</span>
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon className="h-5 w-5 " aria-hidden="true" />
<ChevronUpDownIcon className="h-5 w-5" aria-hidden="true" />
</span>
</Listbox.Button>
<Transition
Expand Down
2 changes: 1 addition & 1 deletion common/components/nav/MenuDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const MenuDropdown: React.FC<MenuDropdownProps> = ({ line, route, childre
>
<div
className={classNames(
'flex w-full flex-row items-center gap-2 rounded-t-md py-1 pl-1 text-sm ',
'flex w-full flex-row items-center gap-2 rounded-t-md py-1 pl-1 text-sm',
`${lineColorBackground[line ?? 'DEFAULT']}`,
selected
? `bg-opacity-100 text-white text-opacity-95`
Expand Down
2 changes: 1 addition & 1 deletion common/components/widgets/WidgetTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const WidgetTitle: React.FC<WidgetTitle> = ({
});
return (
<div className="flex w-full flex-col items-baseline justify-between gap-x-4 gap-y-1 pb-1 text-base md:flex-row md:text-xl">
<div className="flex w-full flex-col md:w-auto ">
<div className="flex w-full flex-col md:w-auto">
<div className="flex w-full flex-row items-baseline justify-between">
<h2 className="whitespace-nowrap leading-tight text-stone-800">{title}</h2>
{isMobile && <p className="text-xs italic text-stone-700">{date}</p>}
Expand Down
Loading

0 comments on commit 10d6a21

Please sign in to comment.