mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: input style priority (#5383)
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
import { style } from '@vanilla-extract/css';
|
||||
|
||||
export const input = style({
|
||||
height: '34px',
|
||||
width: '220px',
|
||||
});
|
||||
@@ -2,7 +2,6 @@ import { useCallback, useState } from 'react';
|
||||
|
||||
import Input from '../../ui/input';
|
||||
import { Menu } from '../../ui/menu';
|
||||
import * as styles from './index.css';
|
||||
|
||||
export const RenameModal = ({
|
||||
onRename,
|
||||
@@ -33,12 +32,12 @@ export const RenameModal = ({
|
||||
}}
|
||||
items={
|
||||
<Input
|
||||
className={styles.input}
|
||||
autoFocus
|
||||
defaultValue={value}
|
||||
onChange={setValue}
|
||||
onEnter={handleRename}
|
||||
data-testid="rename-modal-input"
|
||||
style={{ width: 220, height: 34 }}
|
||||
/>
|
||||
}
|
||||
>
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -201,8 +201,3 @@ export const arrowRight = style({
|
||||
color: 'var(--affine-text-emphasis-color)',
|
||||
cursor: 'pointer',
|
||||
});
|
||||
|
||||
export const workspaceNameInput = style({
|
||||
height: '32px',
|
||||
width: '280px',
|
||||
});
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
|
||||
@@ -43,8 +43,3 @@ globalStyle(`${avatarWrapper} .camera-icon-wrapper`, {
|
||||
export const button = style({
|
||||
padding: '4px 12px',
|
||||
});
|
||||
|
||||
export const userNameInput = style({
|
||||
height: '32px',
|
||||
width: '280px',
|
||||
});
|
||||
|
||||
@@ -5,7 +5,6 @@ import { type ReactElement, useCallback } from 'react';
|
||||
|
||||
import { openAIApiKeyAtom } from '../core/hooks';
|
||||
import { conversationHistoryDBName } from '../core/langchain/message-history';
|
||||
import * as styles from './index.css';
|
||||
|
||||
export const DebugContent = (): ReactElement => {
|
||||
const [key, setKey] = useAtom(openAIApiKeyAtom);
|
||||
@@ -13,7 +12,7 @@ export const DebugContent = (): ReactElement => {
|
||||
<div>
|
||||
<FlexWrapper justifyContent="space-between">
|
||||
<Input
|
||||
className={styles.debugContentInput}
|
||||
style={{ width: 280 }}
|
||||
defaultValue={key ?? undefined}
|
||||
onChange={useCallback(
|
||||
(newValue: string) => {
|
||||
|
||||
@@ -41,7 +41,3 @@ export const sendButtonStyle = style({
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
});
|
||||
|
||||
export const debugContentInput = style({
|
||||
width: '280px',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user