Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
[FRNT-514 FRNT-512] Fix input focus (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
tatinacher committed May 5, 2021
1 parent 11d57da commit bc37f0f
Show file tree
Hide file tree
Showing 5 changed files with 350 additions and 210 deletions.
7 changes: 7 additions & 0 deletions src/lib/box-styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,10 @@ export const ColumnContent = styled.div`
export const TableContent = styled.div`
padding: 10px;
`;

export const Form = styled.form`
width: 100%;
& > div {
margin-bottom: 10px;
}
`;
8 changes: 3 additions & 5 deletions src/ui/atoms/input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Variant } from 'lib/types';
import { InputContainer, InputElement } from '../../elements/quarks';

interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
autoComplete?: 'on' | 'off';
className?: string;
disabled?: boolean;
leftIcon?: React.ReactNode;
Expand All @@ -17,6 +18,7 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
}

const InputBase: React.FC<InputProps & Variant> = ({
autoComplete = 'off',
className,
disabled = false,
leftIcon,
Expand All @@ -37,6 +39,7 @@ const InputBase: React.FC<InputProps & Variant> = ({
variant={variant}
>
<InputElement
autoComplete={autoComplete}
className={className}
disabled={disabled}
name={name}
Expand All @@ -49,11 +52,6 @@ const InputBase: React.FC<InputProps & Variant> = ({
);

export const Input = styled(InputBase)`
--local-vertical: calc(1px * var(--woly-component-level) * var(--woly-main-level));
--local-horizontal: calc(
var(--woly-const-m) + (1px * var(--woly-main-level)) + var(--local-vertical)
);
box-sizing: border-box;
width: 100%;
Expand Down
Loading

0 comments on commit bc37f0f

Please sign in to comment.