This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add bug report button to chrome
- Loading branch information
Showing
6 changed files
with
58 additions
and
7 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,11 @@ | ||
import DemoContainer from '../demo-container'; | ||
import { BugReport } from './index'; | ||
import * as React from 'react'; | ||
|
||
const BugReportDemo: React.StatelessComponent<void> = (): JSX.Element => ( | ||
<DemoContainer title="BugReport"> | ||
<BugReport title="Found a bug?" /> | ||
</DemoContainer> | ||
); | ||
|
||
export default BugReportDemo; |
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,22 @@ | ||
import { Button, ButtonOrder, ButtonSize } from '../button'; | ||
import * as React from 'react'; | ||
import { getSpace, SpaceSize } from '../space'; | ||
import styled from 'styled-components'; | ||
|
||
export interface BugReportProps { | ||
onClick?: React.MouseEventHandler<HTMLElement>; | ||
title: string; | ||
} | ||
|
||
const StyledBugReport = styled.div` | ||
justify-self: right; | ||
margin-right: -${getSpace(SpaceSize.XXL) * 3 - getSpace(SpaceSize.L)}px; // align to top right corner | ||
`; | ||
|
||
export const BugReport: React.StatelessComponent<BugReportProps> = props => ( | ||
<StyledBugReport> | ||
<Button order={ButtonOrder.Secondary} size={ButtonSize.Small} onClick={props.onClick}> | ||
{props.title} | ||
</Button> | ||
</StyledBugReport> | ||
); |
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,8 @@ | ||
{ | ||
"name": "bug-report", | ||
"displayName": "Bug Report", | ||
"description": "Button to report a bug as Github Issue", | ||
"version": "1.0.0", | ||
"tags": ["bug", "bug-report"], | ||
"flag": "alpha" | ||
} |
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,3 +1,4 @@ | ||
export * from './bug-report'; | ||
export * from './button'; | ||
export * from './chrome'; | ||
export * from './colors'; | ||
|
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