Skip to content

Commit 74486d3

Browse files
feat(studio): log drains tidy up sheet footer (supabase#40085)
* feat: log drain add sheet footer revamp * chore: remove commented elements and unused imports * fix: correct docs link for pricing
1 parent e422881 commit 74486d3

File tree

1 file changed

+29
-25
lines changed

1 file changed

+29
-25
lines changed

apps/studio/components/interfaces/LogDrains/LogDrainDestinationSheetForm.tsx

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { toast } from 'sonner'
66
import { z } from 'zod'
77

88
import { IS_PLATFORM, useFlag, useParams } from 'common'
9-
import { DocsButton } from 'components/ui/DocsButton'
9+
import Link from 'next/link'
1010
import { LogDrainData, useLogDrainsQuery } from 'data/log-drains/log-drains-query'
1111
import { DOCS_URL } from 'lib/constants'
1212
import {
@@ -34,6 +34,7 @@ import {
3434
SheetSection,
3535
SheetTitle,
3636
Switch,
37+
cn,
3738
} from 'ui'
3839
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
3940
import { InfoTooltip } from 'ui-patterns/info-tooltip'
@@ -571,33 +572,36 @@ export function LogDrainDestinationSheetForm({
571572

572573
<div className="mt-auto">
573574
<SheetSection
574-
className={`border-t bg-background-alternative-200 mt-auto ${!IS_PLATFORM ? 'hidden' : ''}`}
575+
className={cn(
576+
`border-t bg-background-alternative-200 mt-auto py-1.5 ${!IS_PLATFORM ? 'hidden' : ''}`
577+
)}
575578
>
576-
<FormItemLayout
577-
isReactForm={false}
578-
layout="horizontal"
579-
label={
580-
<div className="flex flex-col gap-y-2 text-foreground-light">
581-
Additional drain cost
582-
<DocsButton
583-
abbrev={false}
584-
className="w-min"
585-
href={`${DOCS_URL}/guides/platform/log-drains`}
586-
/>
587-
</div>
588-
}
589-
>
590-
<ul className="text-right text-foreground-light">
591-
<li className="text-brand-link text-base" translate="no">
592-
$60 per drain per month
593-
</li>
594-
<li translate="no">+ $0.20 per million events</li>
595-
<li translate="no">+ $0.09 per GB egress</li>
596-
</ul>
597-
</FormItemLayout>
579+
<ul className="text-right text-foreground-light divide-y divide-dashed text-sm">
580+
<li className="flex items-center justify-between gap-2 py-2" translate="no">
581+
<span className="text-foreground-lighter">Additional drain cost</span>
582+
<span className="text-foreground">$60 per month</span>
583+
</li>
584+
<li className="flex items-center justify-between gap-2 py-2" translate="no">
585+
<span className="text-foreground-lighter">Per million events</span>
586+
<span>+$0.20</span>
587+
</li>
588+
<li className="flex items-center justify-between gap-2 py-2" translate="no">
589+
<span className="text-foreground-lighter">Per GB egress</span>
590+
<span>+$0.09</span>
591+
</li>
592+
</ul>
598593
</SheetSection>
599594

600-
<SheetFooter className="p-content !mt-0">
595+
<SheetFooter className="p-content !mt-0 !justify-between !flex-row w-full items-center">
596+
<span className="text-sm text-foreground-light">
597+
<span>See full pricing breakdown</span>{' '}
598+
<Link
599+
href={`${DOCS_URL}/guides/platform/manage-your-usage/log-drains`}
600+
className="text-foreground underline underline-offset-2 decoration-foreground-muted hover:decoration-foreground transition-all"
601+
>
602+
here
603+
</Link>
604+
</span>
601605
<Button form={FORM_ID} loading={isLoading} htmlType="submit" type="primary">
602606
Save destination
603607
</Button>

0 commit comments

Comments
 (0)