Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit d0b1140

Browse files
author
Kerry Archibald
committed
improve button styling
Signed-off-by: Kerry Archibald <[email protected]>
1 parent 78e2fb5 commit d0b1140

File tree

4 files changed

+38
-21
lines changed

4 files changed

+38
-21
lines changed

res/css/_components.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@import "./components/views/beacon/_BeaconStatus.scss";
88
@import "./components/views/beacon/_LeftPanelLiveShareWarning.scss";
99
@import "./components/views/beacon/_LiveTimeRemaining.scss";
10+
@import "./components/views/beacon/_OwnBeaconStatus.scss";
1011
@import "./components/views/beacon/_RoomLiveShareWarning.scss";
1112
@import "./components/views/beacon/_StyledLiveBeaconIcon.scss";
1213
@import "./components/views/location/_LiveDurationDropdown.scss";

res/css/components/views/beacon/_BeaconStatus.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,6 @@ limitations under the License.
5656
// TODO handle text-overflow
5757
}
5858

59-
.mx_BeaconStatus_destructiveButton {
60-
// override button link_inline styles
61-
color: $alert !important;
62-
font-weight: $font-semi-bold !important;
63-
text-transform: uppercase;
64-
65-
// align to top to make room for timestamp
66-
// in bubble view
67-
align-self: start;
68-
}
69-
7059
.mx_BeaconStatus_expiryTime {
7160
color: $secondary-content;
7261
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
Copyright 2022 The Matrix.org Foundation C.I.C.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
.mx_EventTile[data-layout="bubble"] .mx_OwnBeaconStatus_button {
18+
// align to top to make room for timestamp
19+
// in bubble view
20+
align-self: start;
21+
}
22+
23+
.mx_OwnBeaconStatus_destructiveButton {
24+
// override button link_inline styles
25+
color: $alert !important;
26+
font-weight: $font-semi-bold !important;
27+
}

src/components/views/beacon/OwnBeaconStatus.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,33 @@ const OwnBeaconStatus: React.FC<Props & HTMLProps<HTMLDivElement>> = ({
5656
displayLiveTimeRemaining
5757
{...rest}
5858
>
59-
{ownDisplayStatus === BeaconDisplayStatus.Active && <AccessibleButton
59+
{ ownDisplayStatus === BeaconDisplayStatus.Active && <AccessibleButton
6060
data-test-id='beacon-status-stop-beacon'
6161
kind='link'
6262
onClick={onStopSharing}
63-
className='mx_BeaconStatus_destructiveButton'
63+
className='mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton'
6464
disabled={stoppingInProgress}
6565
>
66-
{_t('Stop')}
66+
{ _t('Stop') }
6767
</AccessibleButton>
6868
}
69-
{hasWireError && <AccessibleButton
69+
{ hasWireError && <AccessibleButton
7070
data-test-id='beacon-status-reset-wire-error'
7171
kind='link'
7272
onClick={onResetWireError}
73-
className='mx_BeaconStatus_destructiveButton'
73+
className='mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton'
7474
>
75-
{_t('Retry')}
75+
{ _t('Retry') }
7676
</AccessibleButton>
7777
}
78-
{hasStopSharingError && <AccessibleButton
78+
{ hasStopSharingError && <AccessibleButton
7979
data-test-id='beacon-status-stop-beacon-retry'
8080
kind='link'
8181
onClick={onStopSharing}
82-
className='mx_BeaconStatus_destructiveButton'
82+
className='mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton'
8383
>
84-
{_t('Retry')}
85-
</AccessibleButton>}
84+
{ _t('Retry') }
85+
</AccessibleButton> }
8686
</BeaconStatus>;
8787
};
8888

0 commit comments

Comments
 (0)