mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
made better tabs (with context)
This commit is contained in:
parent
f63d2d3228
commit
da510e346a
12 changed files with 103 additions and 194 deletions
|
@ -84,7 +84,7 @@ const InputText: FC<IInputTextProps> = ({
|
|||
</div>
|
||||
|
||||
{title && (
|
||||
<div className={classNames(styles.title, 'input_title')}>
|
||||
<div className={classNames(styles.title)}>
|
||||
<span>{title}</span>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
import * as React from 'react';
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
interface ITextInputProps {
|
||||
type?: 'text' | 'password';
|
||||
placeholder?: string;
|
||||
label?: string;
|
||||
value?: string;
|
||||
|
||||
onChange: React.ChangeEventHandler;
|
||||
}
|
||||
|
||||
export const TextInput: React.FunctionComponent<ITextInputProps> = ({
|
||||
type = 'text',
|
||||
placeholder = '',
|
||||
label,
|
||||
onChange = () => {},
|
||||
value = '',
|
||||
}) => (
|
||||
<div
|
||||
className={styles.wrapper}
|
||||
>
|
||||
<div className={styles.container}>
|
||||
{
|
||||
label
|
||||
&& <div className={styles.label}>{label}</div>
|
||||
}
|
||||
<input
|
||||
placeholder={placeholder}
|
||||
className={styles.input}
|
||||
type={type}
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
|
@ -1,58 +0,0 @@
|
|||
@import "src/styles/variables";
|
||||
|
||||
.wrapper {
|
||||
height: $input_height;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.label {
|
||||
// background: transparentize(black, 0.8);
|
||||
font: $font_14_medium;
|
||||
// color: transparentize(white, 0.5);
|
||||
text-transform: uppercase;
|
||||
padding: 2px $gap;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
border-radius: $radius 0 0 $radius;
|
||||
//@include input_shadow();
|
||||
|
||||
padding: 0 5px;
|
||||
position: absolute;
|
||||
bottom: $input_height - 3px;
|
||||
font: $font_10_semibold;
|
||||
background-color: white;
|
||||
color: transparentize(white, 0.5);
|
||||
border-radius: $radius;
|
||||
left: 6px;
|
||||
background: $content_bg;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: $input_height;
|
||||
background: $input_bg_color;
|
||||
border-radius: $input_radius;
|
||||
flex-direction: row;
|
||||
flex: 1 0;
|
||||
display: flex;
|
||||
align-self: stretch;
|
||||
align-items: stretch;
|
||||
justify-content: center;
|
||||
@include input_shadow();
|
||||
}
|
||||
|
||||
.input {
|
||||
outline: none;
|
||||
background: transparent;
|
||||
flex: 1;
|
||||
border: none;
|
||||
font-size: inherit;
|
||||
color: white;
|
||||
padding: 0 $gap;
|
||||
box-sizing: border-box;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue