This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add plugin settings extension support (#293)
* initial commit * add accesstoken and update plugin extension types * add query param to plugin for marketplace * translations * Update src/i18n/translations/ja.yml Co-authored-by: rot1024 <aayhrot@gmail.com> * Update src/components/molecules/Settings/Project/Plugin/PluginSection/index.tsx Co-authored-by: rot1024 <aayhrot@gmail.com> * Update src/components/molecules/Settings/Project/Plugin/PluginSection/index.tsx Co-authored-by: rot1024 <aayhrot@gmail.com> * Update src/components/molecules/Settings/Project/Plugin/PluginSection/index.tsx Co-authored-by: rot1024 <aayhrot@gmail.com> * Update src/components/molecules/Settings/Project/Plugin/PluginSection/index.tsx Co-authored-by: rot1024 <aayhrot@gmail.com> * Update src/components/organisms/Settings/Project/Plugin/hooks.ts Co-authored-by: rot1024 <aayhrot@gmail.com> * fix formatting issue * add install by marketplace * refactor, update style, add mplace plugin ids * change text color * Add marketplace publish button, update styles * fix spacing * update plugin card ui, add version * update story to fix ci error * update i18n Co-authored-by: rot1024 <aayhrot@gmail.com>
- Loading branch information
Showing
20 changed files
with
578 additions
and
126 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
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
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
67 changes: 67 additions & 0 deletions
67
...olecules/Settings/Project/Plugin/PluginSection/PluginInstall/MarketplacePublish/index.tsx
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,67 @@ | ||
import Flex from "@reearth/components/atoms/Flex"; | ||
import Icon, { Icons } from "@reearth/components/atoms/Icon"; | ||
import Text from "@reearth/components/atoms/Text"; | ||
import { styled } from "@reearth/theme"; | ||
import { metricsSizes } from "@reearth/theme/metrics"; | ||
|
||
export type Props = { | ||
className?: string; | ||
icon: Icons; | ||
buttonText: string; | ||
loading?: boolean; | ||
}; | ||
|
||
const MarketplacePublish: React.FC<Props> = ({ className, icon, buttonText }) => { | ||
return ( | ||
<StyledFlex | ||
className={className} | ||
onClick={() => alert("going to the marketplace")} | ||
justify="center" | ||
align="center"> | ||
<StyledIcon icon={icon} size={91} /> | ||
<Text size="l" customColor> | ||
{buttonText} | ||
</Text> | ||
</StyledFlex> | ||
); | ||
}; | ||
|
||
const StyledFlex = styled(Flex)` | ||
position: relative; | ||
z-index: ${({ theme }) => theme.zIndexes.base}; | ||
overflow: hidden; | ||
flex: 0 0 auto; | ||
box-sizing: border-box; | ||
width: 100%; | ||
color: ${({ theme }) => theme.main.text}; | ||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); | ||
border-radius: ${({ theme }) => theme.metrics.l}px; | ||
padding: ${metricsSizes["m"]}px; | ||
cursor: pointer; | ||
transition: color 0.3s; | ||
&:hover { | ||
color: ${({ theme }) => theme.main.strongText}; | ||
} | ||
&:before { | ||
content: ""; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 150%; | ||
height: 100%; | ||
background: linear-gradient(10.66deg, #232226 30%, #1e2086 70%); | ||
transition: transform 0.3s; | ||
z-index: ${({ theme }) => theme.zIndexes.hidden}; | ||
} | ||
&:hover: :before { | ||
transform: translateX(-15%); | ||
} | ||
`; | ||
|
||
const StyledIcon = styled(Icon)` | ||
margin-right: ${metricsSizes["l"]}px; | ||
`; | ||
|
||
export default MarketplacePublish; |
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
Oops, something went wrong.