fix: input style priority (#5383)

This commit is contained in:
Joooye_34
2023-12-22 15:48:28 +08:00
committed by GitHub
parent f11ea7570a
commit 46f824c4e9
8 changed files with 4 additions and 26 deletions

View File

@@ -203,7 +203,7 @@ export const ProfilePanel = ({ isOwner, workspace }: ProfilePanelProps) => {
<Input
disabled={workspaceIsLoading || !isOwner}
value={input}
className={styles.workspaceNameInput}
style={{ width: 280, height: 32 }}
data-testid="workspace-name-input"
placeholder={t['Workspace Name']()}
maxLength={64}

View File

@@ -201,8 +201,3 @@ export const arrowRight = style({
color: 'var(--affine-text-emphasis-color)',
cursor: 'pointer',
});
export const workspaceNameInput = style({
height: '32px',
width: '280px',
});

View File

@@ -137,12 +137,12 @@ export const AvatarAndName = () => {
<label>{t['com.affine.settings.profile.name']()}</label>
<FlexWrapper alignItems="center">
<Input
className={styles.userNameInput}
defaultValue={input}
data-testid="user-name-input"
placeholder={t['com.affine.settings.profile.placeholder']()}
maxLength={64}
minLength={0}
style={{ width: 280, height: 32 }}
onChange={setInput}
onEnter={handleUpdateUserName}
/>

View File

@@ -43,8 +43,3 @@ globalStyle(`${avatarWrapper} .camera-icon-wrapper`, {
export const button = style({
padding: '4px 12px',
});
export const userNameInput = style({
height: '32px',
width: '280px',
});