Skip to content

Commit

Permalink
Add dockerlist to example app
Browse files Browse the repository at this point in the history
  • Loading branch information
mdvanes committed May 23, 2021
1 parent 91d6b5f commit f97d361
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
18 changes: 18 additions & 0 deletions mocks/api/dockerlist/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"status": "received",
"containers": [
{
"Id": "245425425245afafaffaaafaffaaffaa43542524524524524542542444452532",
"Names": ["/determined_edison"],
"State": "running",
"Status": "Up 11 days"
},

{
"Id": "245425425245afafaffaaafaffaaffaa43542524524524524542542444452531",
"Names": ["/hello_world"],
"State": "exited",
"Status": "Exited (0) 42 hours ago"
}
]
}
1 change: 1 addition & 0 deletions packages/dockerlist-client/.bsb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
398540
2 changes: 1 addition & 1 deletion packages/dockerlist-client/src/DockerList.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const Default = ({ width }: { width: number }): ReactNode => (
<BreakpointWrapper width={width}>
<DockerList
url={url}
onError={action(`some error has occurred`)}
onError={action("some error has occurred")}
confirmButtonStyle={{ backgroundColor: "#1a237e", color: "white" }}
/>
</BreakpointWrapper>
Expand Down
11 changes: 11 additions & 0 deletions packages/example/src/ExampleApp.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import React, { FC, ReactNode } from "react";
// NOTE only use compiled versions, i.e. from lib! To get a good idea of what use of the modules looks like
import StreamPlayer from "@mdworld/homeremote-stream-player";
import { DockerListMod } from "@mdworld/homeremote-dockerlist";
import { Meta } from "@storybook/react";
import "./storybookStyles.css";

const DockerList = DockerListMod.make;

export default {
title: `ExampleApp`,
component: StreamPlayer,
Expand Down Expand Up @@ -46,5 +49,13 @@ export const Default = (): ReactNode => (
from this monorepo.
</p>
<StreamPlayer url={url} />
<DockerList
url="http://localhost:3100"
onError={(err) => alert("some error has occurred" + err)}
confirmButtonStyle={{
backgroundColor: "#1a237e",
color: "white",
}}
/>
</Wrapper>
);

0 comments on commit f97d361

Please sign in to comment.