Skip to content

Commit 34cdfc7

Browse files
committed
fix alignment
1 parent 8a8e4f4 commit 34cdfc7

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/ui/src/components/OAuthConsent/OAuthConsent.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useUser } from '@clerk/shared/react';
22
import type { ComponentProps } from 'react';
3-
import { useState } from 'react';
3+
import { useRef, useState } from 'react';
44

55
import { useEnvironment, useOAuthConsentContext } from '@/ui/contexts';
66
import { Box, Button, Flex, Flow, Grid, Icon, Image, Span, Text } from '@/ui/customizables';
@@ -26,6 +26,7 @@ export function OAuthConsentInternal() {
2626
const { applicationName, logoImageUrl } = useEnvironment().displayConfig;
2727
const [isUriModalOpen, setIsUriModalOpen] = useState(false);
2828
const [selectedValue, setSelectedValue] = useState<string | null>('clerk-nation');
29+
const selectButtonRef = useRef<HTMLButtonElement>(null);
2930

3031
const selectOptions = [
3132
{ value: 'clerk-nation', label: 'Clerk Nation', logoUrl: 'https://img.clerk.com/static/clerk.png' },
@@ -127,6 +128,7 @@ export function OAuthConsentInternal() {
127128
options={selectOptions}
128129
value={selectedValue}
129130
onChange={option => setSelectedValue(option.value)}
131+
referenceElement={selectButtonRef}
130132
renderOption={(option, _index, isSelected) => (
131133
<Box
132134
as='span'
@@ -135,7 +137,7 @@ export function OAuthConsentInternal() {
135137
display: 'grid',
136138
gridTemplateColumns: `${theme.sizes.$5} 1fr ${theme.sizes.$3}`,
137139
columnGap: theme.space.$2,
138-
paddingInline: theme.space.$1,
140+
paddingInline: theme.space.$3,
139141
paddingBlock: theme.space.$1,
140142
alignItems: 'center',
141143
borderRadius: theme.radii.$md,
@@ -172,6 +174,7 @@ export function OAuthConsentInternal() {
172174
)}
173175
>
174176
<SelectButton
177+
ref={selectButtonRef}
175178
sx={theme => ({
176179
inlineSize: 'min(100%, 16rem)',
177180
paddingInline: theme.space.$3,

0 commit comments

Comments
 (0)