Skip to content

Commit

Permalink
Use explicit default input width for consistency across browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatanklosko committed Feb 11, 2024
1 parent da75894 commit dc9b910
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
25 changes: 16 additions & 9 deletions assets/remote_execution_cell/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,14 @@ export default function App({ ctx, payload }) {
</FieldWrapper>
<FieldWrapper>
<InlineLabel label="Assign to" />
<TextField
name="assign_to"
value={fields.assign_to}
onChange={(event) => handleChange(event, false)}
onBlur={handleBlur}
className="w-[120px]"
/>
<div className="w-[140px]">
<TextField
name="assign_to"
value={fields.assign_to}
onChange={(event) => handleChange(event, false)}
onBlur={handleBlur}
/>
</div>
</FieldWrapper>
</Header>
</div>
Expand Down Expand Up @@ -128,12 +129,18 @@ function TextField({
type = "text",
className,
required = false,
fullWidth = false,
inputRef,
startAdornment,
...props
}) {
return (
<div className="flex flex-col">
<div
className={classNames([
"flex max-w-full flex-col",
fullWidth ? "w-full" : "w-[20ch]",
])}
>
{label && (
<label className="color-gray-800 mb-0.5 block text-sm font-medium">
{label}
Expand All @@ -152,7 +159,7 @@ function TextField({
type={type}
value={value}
className={classNames([
"bg-transparent px-3 py-2 text-sm text-gray-600 placeholder-gray-400 focus:outline-none",
"w-full bg-transparent px-3 py-2 text-sm text-gray-600 placeholder-gray-400 focus:outline-none",
className,
])}
/>
Expand Down
8 changes: 0 additions & 8 deletions assets/remote_execution_cell/src/main.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Safari 11+ */

@supports (-webkit-appearance: none) and (stroke-color: transparent) {
input[type="text"] {
max-width: 220px;
}
}
2 changes: 1 addition & 1 deletion lib/assets/remote_execution_cell/build/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dc9b910

Please sign in to comment.