Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subtitle explanining Swarm Settings #573

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions js/node-manager/src/client/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export const Menu: React.FC<MenuProps & ClassName> = ({ className, items }) => {
}
interface LayoutProps {
title?: string
subtitle?: string
input?: InputProps
actions?: ActionProps[]
menuItems?: MenuItem[]
Expand All @@ -207,6 +208,7 @@ interface LayoutProps {

export const Layout: React.FC<LayoutProps & ClassName> = ({
title,
subtitle,
children,
className,
input,
Expand Down Expand Up @@ -316,9 +318,16 @@ export const Layout: React.FC<LayoutProps & ClassName> = ({
</div>
<div className="flex flex-col flex-grow overflow-hidden">
<div className="flex items-center flex-shrink-0 h-16 px-7 border-b border-gray-300 z-10">
<h1 className="text-lg font-medium" id="Layout_Title">
{title}
</h1>
<div className="flex flex-col">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Non-major] Does changing between page make the text go up and down?
If so, then add justify-start py-2 here

<h1 className="text-lg font-medium" id="Layout_Title">
{title}
</h1>
{subtitle !== null && (
<h3 className="text-xs font-normal" id="Layout_Subtitle">
{subtitle}
</h3>
)}
</div>
{input && <Input className="ml-auto" {...input} />}
{actions &&
actions.length > 0 &&
Expand Down
2 changes: 1 addition & 1 deletion js/node-manager/src/client/screens/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const Screen: React.FC<{}> = () => {
}

return (
<Layout title="Swarm Settings" flex>
<Layout title="Swarm Settings" subtitle="Update swarm settings on added nodes" flex>
<div>
<input
type="text"
Expand Down