-
Notifications
You must be signed in to change notification settings - Fork 5
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 #26 from microsoft/won
Dark theme, telemetry, spinner, refactoring
- Loading branch information
Showing
35 changed files
with
740 additions
and
251 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
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 React from "react"; | ||
import "./button.scss"; | ||
import { ButtonProps } from "./button.types"; | ||
import { Telemetry } from "../../../services/Telemetry"; | ||
|
||
export function BaseButton(props: ButtonProps): React.ReactElement { | ||
const { onClick, classNames } = props; | ||
|
||
const handleButtonClicked = () => { | ||
Telemetry.getInstance().event("ButtonClicked", { | ||
buttonName: props.label, | ||
}); | ||
|
||
onClick(); | ||
}; | ||
|
||
return ( | ||
<button className={classNames} onClick={handleButtonClicked}> | ||
{props.label} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
import React from "react"; | ||
import "./button.scss"; | ||
import { ButtonProps } from "./button.types"; | ||
import { BaseButton } from "./BaseButton"; | ||
|
||
export function DefaultButton( | ||
props: React.PropsWithChildren<ButtonProps> | ||
): React.ReactElement { | ||
const { onClick, children } = props; | ||
|
||
return ( | ||
<button className="default-button button" onClick={onClick}> | ||
{children} | ||
</button> | ||
); | ||
export function DefaultButton(props: ButtonProps): React.ReactElement { | ||
return <BaseButton {...props} classNames="default-button 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
import React from "react"; | ||
import "./button.scss"; | ||
import { ButtonProps } from "./button.types"; | ||
import { BaseButton } from "./BaseButton"; | ||
|
||
export function PrimaryButton( | ||
props: React.PropsWithChildren<ButtonProps> | ||
): React.ReactElement { | ||
const { onClick, children } = props; | ||
|
||
return ( | ||
<button className="primary-button button" onClick={onClick}> | ||
{children} | ||
</button> | ||
); | ||
return <BaseButton {...props} classNames="primary-button 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
export type ButtonProps = { | ||
onClick(): void; | ||
title: string; | ||
label: string; | ||
classNames?: string; | ||
}; |
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,5 +1,11 @@ | ||
@import "../../../variables.scss"; | ||
|
||
.footer { | ||
height: 50px; | ||
padding: 20px; | ||
border-top: 1px solid #e0e0e0; | ||
} | ||
border-top: 1px solid $border-color-light; | ||
|
||
@media (prefers-color-scheme: dark) { | ||
border-top: 1px solid $border-color-dark; | ||
} | ||
} |
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,14 +1,31 @@ | ||
@import "../../../variables.scss"; | ||
|
||
.header-root { | ||
height: 50px; | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
padding-left: 20px; | ||
padding-right: 20px; | ||
border-bottom: 1px solid #e0e0e0; | ||
height: 50px; | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
padding-left: 20px; | ||
padding-right: 20px; | ||
border-bottom: 1px solid $border-color-light; | ||
|
||
@media (prefers-color-scheme: dark) { | ||
border-bottom: 1px solid $border-color-dark; | ||
} | ||
} | ||
|
||
.brand-link { | ||
text-decoration: none; | ||
color: default; | ||
} | ||
|
||
.brand { | ||
font-size: 1.125em; | ||
font-weight: 600; | ||
} | ||
font-size: 1.125em; | ||
font-weight: 600; | ||
|
||
color: $font-text-light; | ||
|
||
@media (prefers-color-scheme: dark) { | ||
color: $font-text-dark; | ||
} | ||
} |
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.