Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/two-ways-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Height misalignment fixes for Password section in `<UserProfile/>`
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const ConnectedAccountsSection = withCardStateProvider(() => {
{(error || reauthorizationRequired) && (
<Text
colorScheme='danger'
sx={t => ({ padding: `${t.sizes.$none} ${t.sizes.$4} ${t.sizes.$1x5} ${t.sizes.$10}` })}
sx={t => ({ padding: `${t.sizes.$none} ${t.sizes.$4} ${t.sizes.$1x5} ${t.sizes.$8x5}` })}
localizationKey={errorMessage}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { localizationKeys, Text } from '../../customizables';
import { ProfileSection } from '../../elements';
import { Action } from '../../elements/Action';
import { useActionContext } from '../../elements/Action/ActionRoot';
import { mqu } from '../../styledSystem';
import { PasswordForm } from './PasswordForm';

const PasswordScreen = () => {
Expand All @@ -28,19 +27,21 @@ export const PasswordSection = () => {

return (
<ProfileSection.Root
centered={false}
title={localizationKeys('userProfile.start.passwordSection.title')}
id='password'
sx={{ alignItems: 'center', [mqu.md]: { alignItems: 'flex-start' } }}
>
<Action.Root>
<Action.Closed value='edit'>
<ProfileSection.Item
id='password'
sx={{
sx={t => ({
paddingLeft: !passwordEnabled ? '0' : undefined,
}}
paddingTop: t.space.$0x25,
paddingBottom: t.space.$0x25,
})}
>
{passwordEnabled && <Text sx={t => ({ fontSize: t.fontSizes.$xl })}>••••••••••</Text>}
{passwordEnabled && <Text variant='h2'>••••••••••</Text>}

<Action.Trigger value='edit'>
<ProfileSection.Button
Expand Down
4 changes: 1 addition & 3 deletions packages/clerk-js/src/ui/elements/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,9 @@ const ProfileSectionItem = (props: ProfileSectionItemProps) => {
justifyContent: 'space-between',
width: '100%',
alignItems: 'center',
padding: `${t.space.$2} ${t.space.$3} ${t.space.$1x5} ${t.space.$2x5}`,
padding: `${t.space.$1} ${t.space.$1} ${t.space.$1} ${t.space.$2x5}`,
gap: t.space.$2,
...(hoverable && {
padding: `${t.space.$1} ${t.space.$1} ${t.space.$1} ${t.space.$2x5}`,
borderRadius: t.radii.$lg,
':hover': { backgroundColor: t.colors.$neutralAlpha50 },
}),
Expand All @@ -166,7 +165,6 @@ const ProfileSectionButton = (props: ProfileSectionButtonProps) => {
elementDescriptor={descriptors.profileSectionPrimaryButton}
elementId={descriptors.profileSectionPrimaryButton.setId(id)}
variant='ghost'
textVariant='buttonSmall'
sx={[
t => ({
whiteSpace: 'nowrap',
Expand Down