From 4545db101abfdcac91cc7cabf7bde180b54e9be9 Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Sun, 10 May 2020 15:43:35 -0700 Subject: add password stuff + expiry stuff --- frontend/src/components/Inputs.js | 72 ++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 13 deletions(-) (limited to 'frontend/src/components/Inputs.js') diff --git a/frontend/src/components/Inputs.js b/frontend/src/components/Inputs.js index a45e6de..aa68a70 100644 --- a/frontend/src/components/Inputs.js +++ b/frontend/src/components/Inputs.js @@ -2,11 +2,17 @@ import React from 'react'; import CharLimit from './CharLimit' import styled from 'styled-components' import FloatingLabel from './FloatingLabel' +import Dropdown from 'react-dropdown'; const CharLimitContainer = styled.div` position: relative; ` +const FlexChild = styled.div` + display: block; + margin-left: 2em; +` + class TitleInput extends React.Component { render() { return ( @@ -59,23 +65,63 @@ class PasteInput extends React.Component { class PassInput extends React.Component { render() { return ( - + + + + + + + ); + } +} + +class ExpiryInput extends React.Component { + + _onSelect(option) { + this.callBackRef({target: { + name: 'expiry', + value: option.label + }}); + } + + render() { + const options = [ + '5 years', + '1 year', + '1 month', + '1 week', + '1 day', + '1 hour', + '10 min', + ]; + + return ( + + - - + ); } } -export { TitleInput, PasteInput, PassInput } \ No newline at end of file +export { TitleInput, PasteInput, PassInput, ExpiryInput } \ No newline at end of file -- cgit v1.2.3