Skip to content

Commit

Permalink
Fix padding on CopyableInput
Browse files Browse the repository at this point in the history
The width of the button increased in some previous unrelated change,
but the margin was not updated accordingly. Here the button is shrunk
in width a bit (by adjusting the padding) and the padding of the
textbox/input is adjusted accordingly.
  • Loading branch information
LukasKalbertodt committed May 15, 2023
1 parent 7fcfa3d commit 90dbbda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/ui/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ export const CopyableInput: React.FC<CopyableInputProps> = ({
};

const copyableInputId = useId();
const buttonSize = 34;
const sharedStyle = {
...style(false),
width: "100%",
height: "100%",
padding: `4px ${buttonSize + 10}px 4px 10px`,
padding: "4px 50px 4px 10px",
};
const sharedProps = {
disabled: true,
Expand Down Expand Up @@ -118,6 +117,8 @@ export const CopyableInput: React.FC<CopyableInputProps> = ({
kind="happy"
onClick={copy}
css={{
paddingLeft: 10,
paddingRight: 10,
borderRadius: 4,
borderTopLeftRadius: 0,
height: 34,
Expand Down

0 comments on commit 90dbbda

Please sign in to comment.