forked from extern/bruno
chore: added input in creation collection form
This commit is contained in:
parent
29cd9e4607
commit
4f7b5187be
@ -0,0 +1,24 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Modal from '../../Modal';
|
||||||
|
|
||||||
|
const CreateCollection = ({handleConfirm, handleCancel, actions, dispatch}) => {
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
size="sm"
|
||||||
|
title='Create Collection'
|
||||||
|
handleConfirm={handleConfirm}
|
||||||
|
handleCancel={handleCancel}
|
||||||
|
>
|
||||||
|
<form className="grafnode-form">
|
||||||
|
<label htmlFor="name" className="block font-semibold">Name</label>
|
||||||
|
<input
|
||||||
|
id="collection-name" type="text" name="collection-name"
|
||||||
|
className="block textbox mt-2 w-full"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</form>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CreateCollection;
|
@ -1,6 +1,6 @@
|
|||||||
import React, { useState, forwardRef, useRef } from 'react';
|
import React, { useState, forwardRef, useRef } from 'react';
|
||||||
import Collections from './Collections';
|
import Collections from './Collections';
|
||||||
import Modal from '../Modal';
|
import CreateCollection from './CreateCollection';
|
||||||
import Navbar from '../Navbar';
|
import Navbar from '../Navbar';
|
||||||
import Dropdown from '../Dropdown';
|
import Dropdown from '../Dropdown';
|
||||||
import { IconBox, IconSearch, IconDots } from '@tabler/icons';
|
import { IconBox, IconSearch, IconDots } from '@tabler/icons';
|
||||||
@ -29,16 +29,14 @@ const Sidebar = ({collections, actions, dispatch, activeRequestTabId}) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledWrapper>
|
<StyledWrapper>
|
||||||
{modalOpen && (
|
{modalOpen ? (
|
||||||
<Modal
|
<CreateCollection
|
||||||
size="md"
|
|
||||||
title='Create Collection'
|
|
||||||
handleCancel={handleCancel}
|
handleCancel={handleCancel}
|
||||||
handleConfirm={handleConfirm}
|
handleConfirm={handleConfirm}
|
||||||
>
|
actions={actions}
|
||||||
Hello
|
dispatch={dispatch}
|
||||||
</Modal>
|
/>
|
||||||
)}
|
) : null}
|
||||||
|
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
|
||||||
|
@ -5,6 +5,27 @@ const GlobalStyle = createGlobalStyle`
|
|||||||
background-color: #f6f8fa;
|
background-color: #f6f8fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.grafnode-form {
|
||||||
|
.textbox {
|
||||||
|
line-height: 1.42857143;
|
||||||
|
background-color: #fff;
|
||||||
|
background-image: none;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 0.45rem;
|
||||||
|
box-shadow: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
outline: none;
|
||||||
|
box-shadow: none;
|
||||||
|
transition: border-color ease-in-out .1s;
|
||||||
|
border-radius: 3px;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border: solid 1px #8b8b8b !important;
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes fade-in {
|
@keyframes fade-in {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user