Skip to content

Commit d2ef075

Browse files
committed
feat(ContentWrap): update button styles to reflect current layout mode
1 parent b25fcb9 commit d2ef075

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/ContentWrap.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,7 @@ export default class ContentWrap extends Component {
11351135
<button
11361136
onClick={() => this.props.layoutBtnClickHandler(1)}
11371137
id="layoutBtn1"
1138-
className="w-7 h-7 hover:text-gray-800 flex items-center justify-center rounded-lg duration-200"
1138+
className={`w-7 h-7 hover:text-gray-800 flex items-center justify-center rounded-lg duration-200 ${this.props.currentLayoutMode === 1 ? 'text-gray-800' : ''}`}
11391139
aria-label="Switch to layout with preview on right"
11401140
>
11411141
<svg className="w-5 h-5">
@@ -1145,7 +1145,7 @@ export default class ContentWrap extends Component {
11451145
<button
11461146
onClick={() => this.props.layoutBtnClickHandler(2)}
11471147
id="layoutBtn2"
1148-
className="w-7 h-7 hover:text-gray-800 flex items-center justify-center rounded-lg duration-200"
1148+
className={`w-7 h-7 hover:text-gray-800 flex items-center justify-center rounded-lg duration-200 ${this.props.currentLayoutMode === 2 ? 'text-gray-800' : ''}`}
11491149
aria-label="Switch to layout with preview on bottom"
11501150
>
11511151
<svg className="w-5 h-5">
@@ -1155,7 +1155,7 @@ export default class ContentWrap extends Component {
11551155
<button
11561156
onClick={() => this.props.layoutBtnClickHandler(3)}
11571157
id="layoutBtn3"
1158-
className="w-7 h-7 hover:text-gray-800 flex items-center justify-center rounded-lg duration-200"
1158+
className={`w-7 h-7 hover:text-gray-800 flex items-center justify-center rounded-lg duration-200 ${this.props.currentLayoutMode === 3 ? 'text-gray-800' : ''}`}
11591159
aria-label="Switch to layout with preview on left"
11601160
>
11611161
<svg className="w-5 h-5">

0 commit comments

Comments
 (0)