Skip to content

Commit 10b821f

Browse files
committed
Refactor list items
1 parent e020072 commit 10b821f

File tree

2 files changed

+32
-26
lines changed

2 files changed

+32
-26
lines changed

app/javascript/mastodon/features/circles/components/circle.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Icon from '../../../components/icon';
66
import IconButton from '../../../components/icon_button';
77
import { openModal } from '../../../actions/modal';
88
import { deleteCircle } from '../../../actions/circles';
9+
import { defaultMediaVisibility } from '../../../components/status';
910

1011
const messages = defineMessages({
1112
deleteTitle: { id: 'confirmations.delete_circle.title', defaultMessage: 'Delete' },
@@ -45,13 +46,15 @@ class Circle extends React.PureComponent {
4546
const { text, intl } = this.props;
4647

4748
return (
48-
<button className='circle-link' onClick={this.handleEditClick}>
49-
<div>
49+
<div className='circle-link'>
50+
<button className='circle-edit-button' onClick={this.handleEditClick}>
5051
<Icon id='circle-o' className='column-link__icon' fixedWidth />
5152
{text}
52-
</div>
53-
<IconButton icon='trash' size={16} title={intl.formatMessage(messages.deleteTitle)} onClick={this.handleDeleteClick} />
54-
</button>
53+
</button>
54+
<button className='circle-delete-button' title={intl.formatMessage(messages.deleteTitle)} onClick={this.handleDeleteClick}>
55+
<Icon id='trash' className='column-link__icon' fixedWidth />
56+
</button>
57+
</div>
5558
);
5659
}
5760

app/javascript/styles/mastodon/components.scss

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6327,34 +6327,37 @@ noscript {
63276327
}
63286328
}
63296329

6330-
button.circle-link {
6331-
background: lighten($ui-base-color, 8%);
6332-
color: $primary-text-color;
6330+
.circle-link {
63336331
display: flex;
6334-
font-size: 16px;
6335-
padding: 15px;
6336-
border: 0;
6337-
width: 100%;
6338-
text-align: left;
6339-
text-decoration: none;
6340-
cursor: pointer;
63416332

6342-
&:hover,
6343-
&:focus,
6344-
&:active {
6345-
background: lighten($ui-base-color, 11%);
6333+
.circle-edit-button {
6334+
flex: 1 1 auto;
63466335
}
63476336

6348-
&:focus {
6349-
outline: 0;
6337+
.circle-delete-button {
6338+
flex: 0 0 auto;
63506339
}
63516340

6352-
div {
6353-
flex: 1 1 auto;
6354-
}
6341+
.circle-edit-button,
6342+
.circle-delete-button {
6343+
background: lighten($ui-base-color, 8%);
6344+
color: $primary-text-color;
6345+
padding: 15px;
6346+
font-size: 16px;
6347+
text-align: left;
6348+
text-decoration: none;
6349+
cursor: pointer;
6350+
border: 0;
63556351

6356-
.icon-button {
6357-
flex: 0 0 auto;
6352+
&:hover,
6353+
&:focus,
6354+
&:active {
6355+
background: lighten($ui-base-color, 11%);
6356+
}
6357+
6358+
&:focus {
6359+
outline: 0;
6360+
}
63586361
}
63596362
}
63606363

0 commit comments

Comments
 (0)