Update gallery colors (#430)

* Update gallery colors

* fix lint error

* Fix test
This commit is contained in:
Tanuj Mittal 2021-02-06 01:19:36 +05:30 committed by GitHub
parent 8dc5ed590a
commit f0b4737313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 10 deletions

View File

@ -57,6 +57,8 @@
@FocusColor: #605e5c; @FocusColor: #605e5c;
@GalleryBackgroundColor: #fdfdfd;
/****************************************************************************** /******************************************************************************
METRICS METRICS
/******************************************************************************/ /******************************************************************************/

View File

@ -18,7 +18,6 @@ import * as React from "react";
import { IGalleryItem } from "../../../../Juno/JunoClient"; import { IGalleryItem } from "../../../../Juno/JunoClient";
import { FileSystemUtil } from "../../../Notebook/FileSystemUtil"; import { FileSystemUtil } from "../../../Notebook/FileSystemUtil";
import CosmosDBLogo from "../../../../../images/CosmosDB-logo.svg"; import CosmosDBLogo from "../../../../../images/CosmosDB-logo.svg";
import { StyleConstants } from "../../../../Common/Constants";
export interface GalleryCardComponentProps { export interface GalleryCardComponentProps {
data: IGalleryItem; data: IGalleryItem;
@ -54,6 +53,7 @@ export class GalleryCardComponent extends React.Component<GalleryCardComponentPr
return ( return (
<Card <Card
style={{ background: "white" }}
aria-label={cardTitle} aria-label={cardTitle}
data-is-focusable="true" data-is-focusable="true"
tokens={{ width: GalleryCardComponent.CARD_WIDTH, childrenGap: 0 }} tokens={{ width: GalleryCardComponent.CARD_WIDTH, childrenGap: 0 }}
@ -159,10 +159,7 @@ export class GalleryCardComponent extends React.Component<GalleryCardComponentPr
private generateIconText = (iconName: string, text: string): JSX.Element => { private generateIconText = (iconName: string, text: string): JSX.Element => {
return ( return (
<Text <Text variant="tiny" styles={{ root: { color: "#605E5C", paddingRight: GalleryCardComponent.cardItemGapSmall } }}>
variant="tiny"
styles={{ root: { color: StyleConstants.BaseMediumHigh, paddingRight: GalleryCardComponent.cardItemGapSmall } }}
>
<Icon iconName={iconName} styles={{ root: { verticalAlign: "middle" } }} /> {text} <Icon iconName={iconName} styles={{ root: { verticalAlign: "middle" } }} /> {text}
</Text> </Text>
); );

View File

@ -5,6 +5,11 @@ exports[`GalleryCardComponent renders 1`] = `
aria-label="name" aria-label="name"
data-is-focusable="true" data-is-focusable="true"
onClick={[Function]} onClick={[Function]}
style={
Object {
"background": "white",
}
}
tokens={ tokens={
Object { Object {
"childrenGap": 0, "childrenGap": 0,
@ -88,7 +93,7 @@ exports[`GalleryCardComponent renders 1`] = `
styles={ styles={
Object { Object {
"root": Object { "root": Object {
"color": undefined, "color": "#605E5C",
"paddingRight": 8, "paddingRight": 8,
}, },
} }
@ -112,7 +117,7 @@ exports[`GalleryCardComponent renders 1`] = `
styles={ styles={
Object { Object {
"root": Object { "root": Object {
"color": undefined, "color": "#605E5C",
"paddingRight": 8, "paddingRight": 8,
}, },
} }
@ -136,7 +141,7 @@ exports[`GalleryCardComponent renders 1`] = `
styles={ styles={
Object { Object {
"root": Object { "root": Object {
"color": undefined, "color": "#605E5C",
"paddingRight": 8, "paddingRight": 8,
}, },
} }

View File

@ -6,6 +6,7 @@
overflow-y: auto; overflow-y: auto;
width: 100%; width: 100%;
font-family: @DataExplorerFont; font-family: @DataExplorerFont;
background: @GalleryBackgroundColor;
} }
.publicGalleryTabContainer { .publicGalleryTabContainer {

View File

@ -0,0 +1,5 @@
@import "../../less/Common/Constants";
.standalone-gallery-root {
background: @GalleryBackgroundColor;
}

View File

@ -1,4 +1,5 @@
import "bootstrap/dist/css/bootstrap.css"; import "bootstrap/dist/css/bootstrap.css";
import "./GalleryViewer.less";
import { initializeIcons } from "office-ui-fabric-react/lib/Icons"; import { initializeIcons } from "office-ui-fabric-react/lib/Icons";
import { Text, Link } from "office-ui-fabric-react"; import { Text, Link } from "office-ui-fabric-react";
import * as React from "react"; import * as React from "react";
@ -32,7 +33,7 @@ const onInit = async () => {
}; };
const element = ( const element = (
<> <div className="standalone-gallery-root">
<header> <header>
<GalleryHeaderComponent /> <GalleryHeaderComponent />
</header> </header>
@ -53,7 +54,7 @@ const onInit = async () => {
<GalleryAndNotebookViewerComponent {...props} /> <GalleryAndNotebookViewerComponent {...props} />
</div> </div>
</> </div>
); );
ReactDOM.render(element, document.getElementById("galleryContent")); ReactDOM.render(element, document.getElementById("galleryContent"));