Skip to content

Commit

Permalink
Add copy button on add peer code box and remove check to shoe default…
Browse files Browse the repository at this point in the history
… rule

Co-authored-by: Sarooj Bukhari <[email protected]>
  • Loading branch information
saroojbkhari and saroojbukhari2022 authored Jun 27, 2023
1 parent 8c94119 commit ddfb6a6
Show file tree
Hide file tree
Showing 8 changed files with 685 additions and 504 deletions.
65 changes: 39 additions & 26 deletions src/components/popups/addpeer/addpeer/DockerTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,45 @@ const {Title, Paragraph, Text} = Typography;
export const DockerTab = () => {

const [steps, setSteps] = useState([
{
key: 1,
title: 'Install Docker',
commands: (
<Button style={{marginTop: "5px"}} type="primary" href="https://docs.docker.com/engine/install/" target="_blank">Official Docker website</Button>
),
copied: false,
showCopyButton: false
} as StepCommand,
{
key: 2,
title: 'Run NetBird container',
commands: formatDockerCommand(),
copied: false,
showCopyButton: false
} as StepCommand,
{
key: 3,
title: "Read docs",
commands: (
<Link href="https://docs.netbird.io/how-to/getting-started#running-net-bird-in-docker" target="_blank">Running NetBird in Docker</Link>
),
copied: false,
showCopyButton: false
} as StepCommand
])
{
key: 1,
title: "Install Docker",
commands: (
<Button
style={{ marginTop: "5px" }}
type="primary"
href="https://docs.docker.com/engine/install/"
target="_blank"
>
Official Docker website
</Button>
),
copied: false,
showCopyButton: false,
} as StepCommand,
{
key: 2,
title: "Run NetBird container",
commands: formatDockerCommand(),
commandsForCopy: formatDockerCommand(),
copied: false,
showCopyButton: false,
} as StepCommand,
{
key: 3,
title: "Read docs",
commands: (
<Link
href="https://docs.netbird.io/how-to/getting-started#running-net-bird-in-docker"
target="_blank"
>
Running NetBird in Docker
</Link>
),
copied: false,
showCopyButton: false,
} as StepCommand,
]);

return (
<div style={{marginTop: 10}}>
Expand Down
42 changes: 21 additions & 21 deletions src/components/popups/addpeer/addpeer/LinuxTab.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { useState } from 'react';
import { useState } from "react";

import { Button } from "antd";
import TabSteps from "./TabSteps";
import { StepCommand } from "./types"

import { StepCommand } from "./types";

export const OtherTab = () => {
const [steps, _] = useState([
{
key: 1,
title: "For other installation options check our documentation.",
commands: (
<Button
type="primary"
href={`https://docs.netbird.io/how-to/getting-started#binary-install`}
target="_blank"
>
Documentation
</Button>
),
copied: false,
} as StepCommand,
]);

const [steps, _] = useState([
{
key: 1,
title: 'For other installation options check our documentation.',
commands: (
<Button type="primary" href={`https://docs.netbird.io/how-to/getting-started#binary-install`} target="_blank">
Documentation
</Button>
),
copied: false,
} as StepCommand,
])

return (
<TabSteps stepsItems={steps} />
)
}
return <TabSteps stepsItems={steps} />;
};

export default OtherTab
export default OtherTab;
Loading

0 comments on commit ddfb6a6

Please sign in to comment.