/
Alex_Ural
/
opencode
Обзор
Документация
Войти
/
Alex_Ural
/
opencode
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
packages/ui/src/components/inline-input.tsx
22 строки
708 B
Adam
feat(app): session timeline/turn rework (#13196)
17 фев 2026, 16:16
Не верифицирован
17 фев 2026, 16:16
1098567
Код
Авторство
О чём код?
import type { ComponentProps } from "solid-js" import { splitProps } from "solid-js" export type InlineInputProps = ComponentProps<"input"> & { width?: string } export function InlineInput(props: InlineInputProps) { const [local, others] = splitProps(props, ["class", "width", "style"]) const style = () => { if (!local.style) return { width: local.width } if (typeof local.style === "string") { if (!local.width) return local.style return `${local.style};width:${local.width}` } if (!local.width) return local.style return { ...local.style, width: local.width } } return <input data-component="inline-input" class={local.class} style={style()} {...others} /> }