diff --git a/examples/wallet/app/components/Listing/ListingColumn.js b/examples/wallet/app/components/Listing/ListingColumn.js new file mode 100644 index 0000000..e0895e4 --- /dev/null +++ b/examples/wallet/app/components/Listing/ListingColumn.js @@ -0,0 +1,14 @@ +// @flow +import React from 'react'; +import type { Node } from 'react'; +import Col from 'react-bootstrap/Col'; + +type Props = { + children: Node +}; + +export default ({ children, ...other }: Props) => ( + + {children} + +); diff --git a/examples/wallet/app/components/ListingRow.js b/examples/wallet/app/components/Listing/ListingRow.js similarity index 58% rename from examples/wallet/app/components/ListingRow.js rename to examples/wallet/app/components/Listing/ListingRow.js index 00531d8..08ee0ad 100644 --- a/examples/wallet/app/components/ListingRow.js +++ b/examples/wallet/app/components/Listing/ListingRow.js @@ -5,13 +5,13 @@ import Row from 'react-bootstrap/Row'; import styles from './ListingRow.scss'; type Props = { - key: string | number, + itemKey: string | number, className?: string, children: Node }; -export default ({ key, className, children }: Props) => ( - +export default ({ itemKey, className, children }: Props) => ( + {children} ); diff --git a/examples/wallet/app/components/ListingRow.scss b/examples/wallet/app/components/Listing/ListingRow.scss similarity index 100% rename from examples/wallet/app/components/ListingRow.scss rename to examples/wallet/app/components/Listing/ListingRow.scss diff --git a/examples/wallet/app/components/Listing/ListingTable.js b/examples/wallet/app/components/Listing/ListingTable.js new file mode 100644 index 0000000..21a3db8 --- /dev/null +++ b/examples/wallet/app/components/Listing/ListingTable.js @@ -0,0 +1,14 @@ +// @flow +import React from 'react'; +import type { Node } from 'react'; +import Container from 'react-bootstrap/Container'; + +type Props = { + children: Node +}; + +export default ({ children, ...other }: Props) => ( + + {children} + +); diff --git a/examples/wallet/app/components/OwnStakepoolsList.js b/examples/wallet/app/components/OwnStakepoolsList.js new file mode 100644 index 0000000..b6e564e --- /dev/null +++ b/examples/wallet/app/components/OwnStakepoolsList.js @@ -0,0 +1,29 @@ +// @flow +import React from 'react'; +import Button from 'react-bootstrap/Button'; +import ListingColumn from './Listing/ListingColumn'; +import ListingTable from './Listing/ListingTable'; +import type { PoolId } from '../models'; +import ListingRow from './Listing/ListingRow'; + +type Props = { + stakePools: Array +}; + +export default ({ stakePools }: Props) => { + return ( + + {stakePools && + stakePools.map((poolId: PoolId) => { + return ( + + {poolId} + +