Skip to content

Commit 55a0fda

Browse files
committed
add icons and style linode card actions
1 parent 701a14c commit 55a0fda

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

src/features/linodes/ListLinodes/LinodeCard.tsx

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import Typography from 'material-ui/Typography';
1919
import ContentCopyIcon from 'material-ui-icons/ContentCopy';
2020

2121
import MoreHoriz from 'material-ui-icons/MoreHoriz';
22+
import CallToAction from 'material-ui-icons/CallToAction';
23+
import Replay from 'material-ui-icons/Replay';
2224

2325
import Tag from 'src/components/Tag';
2426
import RegionIndicator from './RegionIndicator';
@@ -49,11 +51,13 @@ const distroIcons = {
4951
type CSSClasses =
5052
'cardSection'
5153
| 'distroIcon'
52-
| 'ipAddress'
54+
| 'rightMargin'
5355
| 'regionIndicator'
5456
| 'flagImg'
5557
| 'cardActions'
56-
| 'button';
58+
| 'button'
59+
| 'consoleButton'
60+
| 'rebootButton';
5761

5862
const styles: StyleRulesCallback<CSSClasses> = (theme: Theme) => ({
5963
cardSection: {
@@ -63,7 +67,7 @@ const styles: StyleRulesCallback<CSSClasses> = (theme: Theme) => ({
6367
marginTop: theme.spacing.unit,
6468
width: theme.spacing.unit * 3,
6569
},
66-
ipAddress: {
70+
rightMargin: {
6771
marginRight: theme.spacing.unit,
6872
},
6973
regionIndicator: {
@@ -73,12 +77,22 @@ const styles: StyleRulesCallback<CSSClasses> = (theme: Theme) => ({
7377
marginRight: theme.spacing.unit,
7478
},
7579
cardActions: {
80+
backgroundColor: '#f9f9f9',
7681
padding: 0,
7782
},
7883
button: {
7984
height: '100%',
8085
margin: 0,
8186
},
87+
consoleButton: {
88+
width: '60%',
89+
borderColor: 'rgba(0, 0, 0, 0.12)',
90+
border: '1px solid',
91+
borderWidth: '0 1px 0 0',
92+
},
93+
rebootButton: {
94+
width: '40%',
95+
},
8296
});
8397

8498
interface Props {
@@ -130,7 +144,7 @@ class LinodeCard extends React.Component<Props & WithStyles<CSSClasses> > {
130144
<div className={classes.cardSection}>
131145
<div>
132146
<Typography variant="body2">
133-
<span className={classes.ipAddress}>{linode.ipv4[0]}</span>
147+
<span className={classes.rightMargin}>{linode.ipv4[0]}</span>
134148
<ContentCopyIcon
135149
className="copyIcon"
136150
onClick={() => copy(linode.ipv4[0])}
@@ -139,7 +153,7 @@ class LinodeCard extends React.Component<Props & WithStyles<CSSClasses> > {
139153
</div>
140154
<div>
141155
<Typography>
142-
<span className={classes.ipAddress}>{linode.ipv6}</span>
156+
<span className={classes.rightMargin}>{linode.ipv6}</span>
143157
<ContentCopyIcon
144158
className="copyIcon"
145159
onClick={() => copy(linode.ipv6)}
@@ -151,11 +165,14 @@ class LinodeCard extends React.Component<Props & WithStyles<CSSClasses> > {
151165
<RegionIndicator region={linode.region} />
152166
</div>
153167
</CardContent>
168+
<Divider />
154169
<CardActions className={classes.cardActions}>
155-
<Button className={classes.button}>
170+
<Button className={`${classes.button} ${classes.consoleButton}`}>
171+
<CallToAction className={classes.rightMargin}/>
156172
Launch Console
157173
</Button>
158-
<Button className={classes.button}>
174+
<Button className={`${classes.button} ${classes.rebootButton}`}>
175+
<Replay className={classes.rightMargin}/>
159176
Reboot
160177
</Button>
161178
</CardActions>

0 commit comments

Comments
 (0)