forked from PotLock/bos-app-alem
-
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.
Merge pull request PotLock#58 from PotLock/feat/register-project
Feat/register project
- Loading branch information
Showing
22 changed files
with
1,672 additions
and
812 deletions.
There are no files selected for viewing
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,60 @@ | ||
const getButtonBackground = () => { | ||
if (props.type === "primary") { | ||
if (props.disabled) { | ||
return "#e5e5e5"; | ||
} | ||
return "#dd3345"; | ||
} else if (props.type === "secondary") { | ||
// TODO: handle disabled | ||
return "#FCE9D5"; | ||
} | ||
}; | ||
|
||
const getButtonColor = () => { | ||
if (props.type === "primary") { | ||
if (props.disabled) { | ||
return "darkgrey"; | ||
} | ||
return "white"; | ||
} | ||
return "#2E2E2E"; | ||
}; | ||
|
||
const Button = styled.button` | ||
// width: 100%; | ||
height: 100%; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 8px 24px 12px 24px; | ||
background: ${getButtonBackground()}; | ||
overflow: hidden; | ||
box-shadow: 0px -2.700000047683716px 0px #4a4a4a inset; | ||
border-radius: 6px; | ||
border: 1px solid #4a4a4a; | ||
gap: 8px; | ||
display: inline-flex; | ||
text-align: center; | ||
color: ${getButtonColor()}; | ||
font-size: 14px; | ||
font-weight: 600; | ||
&:hover { | ||
text-decoration: none; | ||
cursor: ${props.disabled ? "not-allowed" : "pointer"}; | ||
} | ||
`; | ||
|
||
console.log("rendering action button"); | ||
|
||
return ( | ||
<Button | ||
onClick={(e) => { | ||
e.preventDefault(); | ||
props.onClick(e); | ||
}} | ||
disabled={props.disabled} | ||
> | ||
{props.text} | ||
</Button> | ||
); |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const getButtonBackground = () => { | ||
if (props.type === "primary") { | ||
if (props.disabled) { | ||
return "#e5e5e5"; | ||
} | ||
return "#dd3345"; | ||
} else if (props.type === "secondary") { | ||
// TODO: handle disabled | ||
return "#FCE9D5"; | ||
} | ||
}; | ||
|
||
const getButtonColor = () => { | ||
if (props.type === "primary") { | ||
if (props.disabled) { | ||
return "darkgrey"; | ||
} | ||
return "white"; | ||
} | ||
return "#2E2E2E"; | ||
}; | ||
|
||
const Button = styled.a` | ||
// width: 100%; | ||
height: 100%; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 8px 24px 12px 24px; | ||
background: ${getButtonBackground()}; | ||
overflow: hidden; | ||
box-shadow: 0px -2.700000047683716px 0px #4a4a4a inset; | ||
border-radius: 6px; | ||
border: 1px solid #4a4a4a; | ||
gap: 8px; | ||
display: inline-flex; | ||
text-align: center; | ||
color: ${getButtonColor()}; | ||
font-size: 14px; | ||
font-weight: 600; | ||
&:hover { | ||
text-decoration: none; | ||
cursor: ${props.disabled ? "not-allowed" : "pointer"}; | ||
} | ||
`; | ||
|
||
return ( | ||
<Button href={props.href} onClick={props.onClick} disabled={props.disabled}> | ||
{props.text} | ||
</Button> | ||
); |
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
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
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 |
---|---|---|
@@ -1 +1,16 @@ | ||
const Container = styled.div``; | ||
const ownerId = "potlock.near"; | ||
|
||
return ( | ||
<> | ||
<Widget | ||
src={`${ownerId}/widget/Components.Header`} | ||
props={{ | ||
title1: "Create new project", | ||
description: | ||
"Lorem ipsum dolor sit amet consectetur. Vel sit nunc in nunc. Viverra arcu eu sed consequat.", | ||
centered: false, | ||
}} | ||
/> | ||
<Widget src={`${ownerId}/widget/Project.CreateForm`} /> | ||
</> | ||
); |
Oops, something went wrong.