mirror of
https://github.com/trezor/trezor-wallet
synced 2025-01-11 08:31:00 +00:00
Added wallet container
This commit is contained in:
parent
c4d851d882
commit
ff1cdc59e9
54
src/components/WalletViewContainer/index.js
Normal file
54
src/components/WalletViewContainer/index.js
Normal file
@ -0,0 +1,54 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import styled from 'styled-components';
|
||||
import colors from 'config/colors';
|
||||
import { FONT_SIZE, FONT_WEIGHT, FONT_FAMILY } from 'config/variables';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
padding:
|
||||
`;
|
||||
|
||||
const Textarea = ({
|
||||
className,
|
||||
placeholder = '',
|
||||
value,
|
||||
customStyle = {},
|
||||
onFocus,
|
||||
onBlur,
|
||||
isDisabled,
|
||||
onChange,
|
||||
isError,
|
||||
topLabel,
|
||||
}) => (
|
||||
<Wrapper>
|
||||
{topLabel && (
|
||||
<TopLabel>{topLabel}</TopLabel>
|
||||
)}
|
||||
<StyledTextarea
|
||||
className={className}
|
||||
disabled={isDisabled}
|
||||
style={customStyle}
|
||||
onFocus={onFocus}
|
||||
onBlur={onBlur}
|
||||
value={value}
|
||||
placeholder={placeholder}
|
||||
onChange={onChange}
|
||||
isError={isError}
|
||||
/>
|
||||
</Wrapper>
|
||||
);
|
||||
|
||||
Textarea.propTypes = {
|
||||
className: PropTypes.string,
|
||||
isError: PropTypes.bool,
|
||||
onFocus: PropTypes.func,
|
||||
onBlur: PropTypes.func,
|
||||
onChange: PropTypes.func,
|
||||
customStyle: PropTypes.string,
|
||||
placeholder: PropTypes.string,
|
||||
value: PropTypes.string,
|
||||
isDisabled: PropTypes.bool,
|
||||
topLabel: PropTypes.node,
|
||||
};
|
||||
|
||||
export default Textarea;
|
@ -13,7 +13,8 @@ const Wrapper = styled.div`
|
||||
color: ${colors.TEXT_SECONDARY};
|
||||
background: ${colors.LANDING};
|
||||
${props => props.hasBorder && css`
|
||||
border: 1px solid ${colors.BODY};
|
||||
border-top: 1px solid ${colors.BODY};
|
||||
border-bottom: 1px solid ${colors.BODY};
|
||||
`}
|
||||
`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user