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

[FRNT-514 FRNT-512] Fix input focus #102

Merged
merged 1 commit into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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