Skip to content

Commit 9b20b7c

Browse files
authored
Remove flex- from grow and shrink classNames (#2248)
Clean up Tailwind flex- class names
1 parent f20a5bc commit 9b20b7c

File tree

9 files changed

+16
-19
lines changed

9 files changed

+16
-19
lines changed

app/components/CapacityBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type TitleCellProps = { icon: JSX.Element; title: string; unit: string }
5252
function TitleCell({ icon, title, unit }: TitleCellProps) {
5353
return (
5454
<div>
55-
<div className="flex flex-grow items-center">
55+
<div className="flex grow items-center">
5656
<span className="mr-2 flex h-4 w-4 items-center text-accent">{icon}</span>
5757
<span className="!normal-case text-mono-sm text-secondary">{title}</span>
5858
<span className="ml-1 !normal-case text-mono-sm text-quaternary">({unit})</span>

app/components/TopBarPicker.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ const TopBarPicker = (props: TopBarPickerProps) => {
5757
<Wrap
5858
when={props.to}
5959
with={
60-
<Link
61-
to={props.to!}
62-
className="-m-1 flex-grow rounded-lg p-1 hover:bg-hover"
63-
/>
60+
<Link to={props.to!} className="-m-1 grow rounded-lg p-1 hover:bg-hover" />
6461
}
6562
>
6663
<div className="flex min-w-[120px] max-w-[185px] items-center pr-2">
@@ -91,7 +88,7 @@ const TopBarPicker = (props: TopBarPickerProps) => {
9188
)}
9289

9390
{props.items && (
94-
<div className="ml-2 flex-shrink-0">
91+
<div className="ml-2 shrink-0">
9592
<DropdownMenu.Trigger
9693
className="group"
9794
aria-label={props['aria-label']}

app/layouts/helpers.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ export function ContentPane() {
2121
useScrollRestoration(ref)
2222
return (
2323
<div ref={ref} className="flex flex-col overflow-auto" data-testid="scroll-container">
24-
<div className="flex flex-grow flex-col pb-8">
24+
<div className="flex grow flex-col pb-8">
2525
<SkipLinkTarget />
2626
<main className="[&>*]:gutter">
2727
<Outlet />
2828
</main>
2929
</div>
30-
<div className="sticky bottom-0 flex-shrink-0 justify-between overflow-hidden border-t bg-default border-secondary empty:border-t-0">
30+
<div className="sticky bottom-0 shrink-0 justify-between overflow-hidden border-t bg-default border-secondary empty:border-t-0">
3131
<Pagination.Target />
3232
<PageActionsTarget />
3333
</div>
@@ -43,7 +43,7 @@ export function ContentPane() {
4343
*/
4444
export const SerialConsoleContentPane = () => (
4545
<div className="flex flex-col overflow-auto">
46-
<div className="flex flex-grow flex-col">
46+
<div className="flex grow flex-col">
4747
<SkipLinkTarget />
4848
<main className="[&>*]:gutter h-full">
4949
<Outlet />

app/pages/project/floating-ips/AttachFloatingIpModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function FloatingIpLabel({ fip }: { fip: FloatingIp }) {
2323
{fip.description && (
2424
<>
2525
<span className="mx-1 text-quinary selected:text-accent-disabled">/</span>
26-
<div className="flex-grow overflow-hidden overflow-ellipsis whitespace-pre text-left">
26+
<div className="grow overflow-hidden overflow-ellipsis whitespace-pre text-left">
2727
{fip.description}
2828
</div>
2929
</>

app/pages/project/instances/instance/SerialConsolePage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,19 @@ export function SerialConsolePage() {
100100
<div className="!mx-0 flex h-full max-h-[calc(100vh-60px)] !w-full flex-col">
101101
<Link
102102
to={pb.instance(instanceSelector)}
103-
className="mx-3 mb-6 mt-3 flex h-10 flex-shrink-0 items-center rounded px-3 bg-accent-secondary"
103+
className="mx-3 mb-6 mt-3 flex h-10 shrink-0 items-center rounded px-3 bg-accent-secondary"
104104
>
105105
<PrevArrow12Icon className="text-accent-tertiary" />
106106
<div className="ml-2 text-mono-sm text-accent">
107107
<span className="text-accent-tertiary">Back to</span> instance
108108
</div>
109109
</Link>
110110

111-
<div className="gutter relative w-full flex-shrink flex-grow overflow-hidden">
111+
<div className="gutter relative w-full shrink grow overflow-hidden">
112112
{connectionStatus !== 'open' && <SerialSkeleton />}
113113
<Suspense fallback={null}>{ws.current && <Terminal ws={ws.current} />}</Suspense>
114114
</div>
115-
<div className="flex-shrink-0 justify-between overflow-hidden border-t bg-default border-secondary empty:border-t-0">
115+
<div className="shrink-0 justify-between overflow-hidden border-t bg-default border-secondary empty:border-t-0">
116116
<div className="gutter flex h-20 items-center justify-between">
117117
<div>
118118
<EquivalentCliCommand command={cliCmd.serialConsole({ project, instance })} />
@@ -131,7 +131,7 @@ function SerialSkeleton() {
131131
const instanceSelector = useInstanceSelector()
132132

133133
return (
134-
<div className="relative h-full flex-shrink flex-grow overflow-hidden">
134+
<div className="relative h-full shrink grow overflow-hidden">
135135
<div className="h-full space-y-2 overflow-hidden">
136136
{[...Array(200)].map((_e, i) => (
137137
<div

app/pages/project/instances/instance/tabs/MetricsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function DiskMetric({
123123
}
124124

125125
return (
126-
<div className="flex w-1/2 flex-grow flex-col">
126+
<div className="flex w-1/2 grow flex-col">
127127
<h2 className="ml-3 flex items-center text-mono-xs text-secondary ">
128128
{title} <div className="ml-1 normal-case text-quaternary">{label}</div>
129129
{isLoading && <Spinner className="ml-2" />}

app/ui/lib/DatePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function DatePicker(props: DatePickerProps) {
9595
value={state.timeValue}
9696
onChange={handleSetTime}
9797
hourCycle={24}
98-
className="flex-grow"
98+
className="grow"
9999
/>
100100
</div>
101101
</Dialog>

app/ui/lib/DateRangePicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ export function DateRangePicker(props: DateRangePickerProps) {
9696
value={state.timeRange?.start || null}
9797
onChange={(v: TimeValue) => state.setTime('start', v)}
9898
hourCycle={24}
99-
className="flex-shrink-0 flex-grow basis-0"
99+
className="shrink-0 grow basis-0"
100100
/>
101101
<div className="text-quinary"></div>
102102
<TimeField
103103
label="End time"
104104
value={state.timeRange?.end || null}
105105
onChange={(v: TimeValue) => state.setTime('end', v)}
106106
hourCycle={24}
107-
className="flex-shrink-0 flex-grow basis-0"
107+
className="shrink-0 grow basis-0"
108108
/>
109109
</div>
110110
</Dialog>

app/ui/lib/Pagination.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const Pagination = ({
5555
className
5656
)}
5757
>
58-
<span className="flex-inline flex-grow text-tertiary">
58+
<span className="flex-inline grow text-tertiary">
5959
rows per page <PageInput number={pageSize} />
6060
</span>
6161
<span className="flex space-x-3">

0 commit comments

Comments
 (0)