/* eslint-disable camelcase */ import React from 'react'; import { Field } from 'redux-form'; import { Margin, Padding } from 'styled-components-spacing'; import styled from 'styled-components'; import Flex, { FlexItem } from 'styled-flex-component'; import remcalc from 'remcalc'; import { Row, Col } from 'react-styled-flexboxgrid'; import { H4, P, Small, DotIcon, Card, CardHeader, CardHeaderMeta, CardHeaderBox, CardOutlet, FormGroup, FormLabel, Input, Checkbox, Divider, FabricIcon, DataCenterIcon, PublicIcon, PrivateIcon, ArrowIcon } from 'joyent-ui-toolkit'; const Box = styled.div` display: inline-block; background-color: ${props => props.theme.white}; border: ${remcalc(1)} solid ${props => props.theme.grey}; border-radius: ${remcalc(4)}; min-width: ${remcalc(300)}; `; export const Collapsed = ({ name, fabric, ...network }) => ( {name} {network.public ? : } {network.public ? 'Public' : 'Private'} {fabric ? : } {fabric ? 'Fabric network' : 'Data center network'} ); export const Expanded = ({ id, name, fabric, subnet, description, provision_start_ip, provision_end_ip, selected = false, infoExpanded = false, onInfoClick, ...network }) => ( {name} {description && ( {description} )} {network.public ? : } {network.public ? 'Public' : 'Private'} {fabric ? : } {fabric ? 'Fabric network' : 'Data center network'} {fabric ? ( Network information {infoExpanded ? ( {network.internet_nat ? ( Outbound internet access enabled ) : null} ID Subnet IP range ) : null} ) : null} ); export default ({ small = false, ...rest }) => small ? : ;
{name}
{network.public ? 'Public' : 'Private'}
{fabric ? 'Fabric network' : 'Data center network'}
{description}
Network information