This repository has been archived by the owner on Oct 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Certificate actions buttons and input fields (#16)
Added the form and the buttons --- Co-authored-by: Paulius Michelevicius <paulius.michelevicius@gmail.com>
- Loading branch information
1 parent
d9a9e0f
commit ff7b13e
Showing
20 changed files
with
780 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
|
||
<style> | ||
body { | ||
background-color: '#F5F5F5'; | ||
margin: 0px; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
import React, { useState } from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { Grid, Button } from '@digicatapult/ui-component-library' | ||
|
||
export default function CertificateActionsButtons() { | ||
const [isWaitingVal, setIsWaitingVal] = useState(false) | ||
|
||
const handleClickSaveDraft = () => alert('Saved') | ||
const handleCancelDraft = () => alert('Cancelled') | ||
const handleClickSubmit = (e) => { | ||
e.preventDefault() | ||
setIsWaitingVal(true) | ||
setTimeout(() => { | ||
e.target.form.requestSubmit() | ||
}, 2000) | ||
} | ||
|
||
return ( | ||
<Sidebar area="sidebar"> | ||
<PaddedDiv> | ||
<Grid | ||
areas={[ | ||
['div-left', 'div-right'], | ||
['div-double', 'div-double'], | ||
]} | ||
rows={['40px', '60px']} | ||
columns={['1fr', '1fr']} | ||
gap="20px 10px" | ||
> | ||
<Grid.Panel area="div-left"> | ||
<SmallButton | ||
variant="roundedPronounced" | ||
onClick={handleClickSaveDraft} | ||
> | ||
Save draft | ||
</SmallButton> | ||
</Grid.Panel> | ||
<Grid.Panel area="div-right"> | ||
<SmallButton | ||
variant="roundedPronounced" | ||
onClick={handleCancelDraft} | ||
> | ||
Cancel | ||
</SmallButton> | ||
</Grid.Panel> | ||
<Grid.Panel area="div-double"> | ||
<LargeButton | ||
variant="roundedPronounced" | ||
onClick={handleClickSubmit} | ||
> | ||
Submit | ||
{isWaitingVal && <span>...</span>} | ||
</LargeButton> | ||
</Grid.Panel> | ||
</Grid> | ||
</PaddedDiv> | ||
</Sidebar> | ||
) | ||
} | ||
|
||
const Sidebar = styled(Grid.Panel)` | ||
align-items: center; | ||
justify-items: center; | ||
min-width: 340px; | ||
color: white; | ||
background: #0c3b38; | ||
` | ||
|
||
const PaddedDiv = styled.div` | ||
padding: 34px 21px; | ||
width: 100%; | ||
` | ||
|
||
const SmallButton = styled(Button)` | ||
width: 100%; | ||
min-width: 132px; | ||
height: 100% !important; | ||
font-family: Roboto; | ||
font-style: normal; | ||
font-weight: 500; | ||
white-space: nowrap; | ||
font-size: 15.5px; | ||
color: #ffffff; | ||
border: 1px solid #ffffff !important; | ||
background: #124338 !important; | ||
&:hover { | ||
opacity: 0.6; | ||
} | ||
` | ||
|
||
const LargeButton = styled(SmallButton)` | ||
font-size: 21px; | ||
color: #33e58c; | ||
border: 1px solid #2fe181 !important; | ||
background: #124338 !important; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import React from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { Section } from '@digicatapult/ui-component-library' | ||
|
||
import BgImageSVG from '../../assets/images/molecules-bg-repeat.svg' | ||
|
||
export default function CertificateFormHeader() { | ||
return ( | ||
<GreenBgDiv> | ||
<WrapperDiv> | ||
<Section | ||
background="#e4e4e4" | ||
headingGap="0ch" | ||
headingLevel={3} | ||
headingSize="0em" | ||
height="auto" | ||
padding="1ch 1ch" | ||
title="" | ||
width="33%" | ||
> | ||
<UnorderedList> | ||
<ListItem> | ||
Hydrogen Producer: <strong>Heidi</strong> | ||
</ListItem> | ||
<ListItem> | ||
Energy Producer: <strong>Emma</strong> | ||
</ListItem> | ||
<ListItem> | ||
Regulator: <strong>Reginald</strong> | ||
</ListItem> | ||
</UnorderedList> | ||
</Section> | ||
</WrapperDiv> | ||
</GreenBgDiv> | ||
) | ||
} | ||
|
||
const WrapperDiv = styled.div` | ||
min-width: 250px; | ||
` | ||
|
||
const GreenBgDiv = styled.div` | ||
background: #228077 url(${BgImageSVG}) repeat 25%; | ||
` | ||
|
||
const UnorderedList = styled.ul` | ||
list-style-type: none; | ||
margin: 0; | ||
font-weight: 900; | ||
padding: 0; | ||
` | ||
|
||
const ListItem = styled.li` | ||
color: #1a1a1a; | ||
font-family: Roboto; | ||
font-weight: 100; | ||
font-size: 16px; | ||
` |
Oops, something went wrong.