import React, { Fragment } from 'react'; import { Link } from 'react-router-dom'; import styled from 'styled-components'; import { Field } from 'redux-form'; import Flex, { FlexItem } from 'styled-flex-component'; import { Padding, Margin } from 'styled-components-spacing'; import remcalc from 'remcalc'; import { Card, Anchor, CardHeader, Divider, ActionsIcon, PopoverTarget, Popover, PopoverItem, PopoverDivider as BasePopoverDivider, PopoverContainer, Radio, FormLabel, FormGroup, StatusLoader } from 'joyent-ui-toolkit'; import GLOBAL from '@state/global'; import { ImageType, OS } from '@root/constants'; const A = styled(Anchor)` color: ${props => props.theme.text}; text-decoration: none; font-weight: ${props => props.theme.font.weight.semibold}; `; const CardAnchor = styled(Anchor)` color: ${props => props.theme.text}; text-decoration: none; `; const ItemAnchor = styled(Anchor)` color: ${props => props.theme.text}; -webkit-text-fill-color: currentcolor; text-decoration: none; `; const Type = styled(Margin)` overflow: hidden; white-space: nowrap; text-overflow: ellipsis; `; const Content = styled(Padding)` max-width: calc(100% - ${remcalc(48)}); overflow: hidden; `; const Max = styled(Flex)` max-width: 100%; `; const Actions = styled(Flex)` width: ${remcalc(48)}; height: ${remcalc(48)}; min-width: ${remcalc(48)}; `; const ActionsWrapper = styled(Flex)` height: 100%; width: 100%; border-left: ${remcalc(1)} solid ${props => props.theme.grey}; `; const PopoverDivider = styled(BasePopoverDivider)` width: 100%; `; export const Image = ({ name, id, os, version, type, removing, onRemove, onCreateInstance }) => ( {removing ? ( ) : ( {React.createElement(OS[os], { width: '24', height: '24' })} {name} {version} {ImageType[type]} Create Instance Remove )} ); export const Filters = ({ selected }) => ( All Virtual machines Infrastructure container );