1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Styling helm chart section

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-04-02 16:01:59 +03:00
parent 4a20624bd7
commit a51907f6d4
5 changed files with 28 additions and 19 deletions

View File

@ -1,11 +1,21 @@
.HelmCharts { .HelmCharts {
.repos { .repos {
margin-top: var(--margin); margin-top: 20px;
.Badge { .repo {
display: flex; background: var(--inputControlBackground);
margin-bottom: 1px!important; border-radius: 4px;
padding: 6px 8px; padding: 12px 16px;
box-shadow: 0 0 0 1px var(--secondaryBackground);
.repoName {
font-weight: 500;
margin-bottom: 8px;
}
.repoUrl {
color: var(--textColorDimmed);
}
} }
} }
} }

View File

@ -4,12 +4,10 @@ import React from "react";
import { action, computed, observable } from "mobx"; import { action, computed, observable } from "mobx";
import { HelmRepo, repoManager } from "../../../main/helm/helm-repo-manager"; import { HelmRepo, repoManager } from "../../../main/helm/helm-repo-manager";
import { Badge } from "../badge";
import { Button } from "../button"; import { Button } from "../button";
import { Icon } from "../icon"; import { Icon } from "../icon";
import { Notifications } from "../notifications"; import { Notifications } from "../notifications";
import { Select, SelectOption } from "../select"; import { Select, SelectOption } from "../select";
import { Tooltip } from "../tooltip";
import { AddHelmRepoDialog } from "./add-helm-repo-dialog"; import { AddHelmRepoDialog } from "./add-helm-repo-dialog";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
@ -116,20 +114,18 @@ export class HelmCharts extends React.Component {
<AddHelmRepoDialog onAddRepo={() => this.loadRepos()}/> <AddHelmRepoDialog onAddRepo={() => this.loadRepos()}/>
<div className="repos flex gaps column"> <div className="repos flex gaps column">
{Array.from(this.addedRepos).map(([name, repo]) => { {Array.from(this.addedRepos).map(([name, repo]) => {
const tooltipId = `message-${name}`;
return ( return (
<Badge key={name} className="added-repo flex gaps align-center justify-space-between"> <div key={name} className="repo flex gaps align-center justify-space-between">
<span id={tooltipId} className="repo">{name}</span> <div>
<div className="repoName">{name}</div>
<div className="repoUrl">{repo.url}</div>
</div>
<Icon <Icon
material="delete" material="delete"
onClick={() => this.removeRepo(repo)} onClick={() => this.removeRepo(repo)}
tooltip="Remove" tooltip="Remove"
/> />
<Tooltip targetId={tooltipId} formatters={{ narrow: true }}> </div>
{repo.url}
</Tooltip>
</Badge>
); );
})} })}
</div> </div>

View File

@ -133,9 +133,6 @@ export class Preferences extends React.Component {
onChange={v => this.shell = v} onChange={v => this.shell = v}
onBlur={() => preferences.shell = this.shell} onBlur={() => preferences.shell = this.shell}
/> />
<div className="hint">
The path of the shell that the terminal uses.
</div>
</section> </section>
</section> </section>
)} )}

View File

@ -98,6 +98,12 @@
> .content { > .content {
width: var(--width); width: var(--width);
padding: 60px 40px 80px; padding: 60px 40px 80px;
> section {
&:last-of-type {
margin-bottom: 80px;
}
}
} }
> .toolsRegion { > .toolsRegion {

View File

@ -12,7 +12,7 @@
"textColorPrimary": "#555555", "textColorPrimary": "#555555",
"textColorSecondary": "#51575d", "textColorSecondary": "#51575d",
"textColorAccent": "#333333", "textColorAccent": "#333333",
"textColorDimmed": "#8e92978c", "textColorDimmed": "#5557598c",
"borderColor": "#c9cfd3", "borderColor": "#c9cfd3",
"borderFaintColor": "#dfdfdf", "borderFaintColor": "#dfdfdf",
"mainBackground": "#f1f1f1", "mainBackground": "#f1f1f1",