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

Commit

Permalink
improve button styling
Browse files Browse the repository at this point in the history
Signed-off-by: Kerry Archibald <kerrya@element.io>
  • Loading branch information
Kerry Archibald committed Apr 12, 2022
1 parent b11567e commit b94f099
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 21 deletions.
1 change: 1 addition & 0 deletions res/css/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
@import "./components/views/beacon/_BeaconStatus.scss";
@import "./components/views/beacon/_LeftPanelLiveShareWarning.scss";
@import "./components/views/beacon/_LiveTimeRemaining.scss";
@import "./components/views/beacon/_OwnBeaconStatus.scss";
@import "./components/views/beacon/_RoomLiveShareWarning.scss";
@import "./components/views/beacon/_StyledLiveBeaconIcon.scss";
@import "./components/views/location/_LiveDurationDropdown.scss";
Expand Down
11 changes: 0 additions & 11 deletions res/css/components/views/beacon/_BeaconStatus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,6 @@ limitations under the License.
// TODO handle text-overflow
}

.mx_BeaconStatus_destructiveButton {
// override button link_inline styles
color: $alert !important;
font-weight: $font-semi-bold !important;
text-transform: uppercase;

// align to top to make room for timestamp
// in bubble view
align-self: start;
}

.mx_BeaconStatus_expiryTime {
color: $secondary-content;
}
27 changes: 27 additions & 0 deletions res/css/components/views/beacon/_OwnBeaconStatus.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

.mx_EventTile[data-layout="bubble"] .mx_OwnBeaconStatus_button {
// align to top to make room for timestamp
// in bubble view
align-self: start;
}

.mx_OwnBeaconStatus_destructiveButton {
// override button link_inline styles
color: $alert !important;
font-weight: $font-semi-bold !important;
}
20 changes: 10 additions & 10 deletions src/components/views/beacon/OwnBeaconStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,33 @@ const OwnBeaconStatus: React.FC<Props & HTMLProps<HTMLDivElement>> = ({
displayLiveTimeRemaining
{...rest}
>
{ownDisplayStatus === BeaconDisplayStatus.Active && <AccessibleButton
{ ownDisplayStatus === BeaconDisplayStatus.Active && <AccessibleButton
data-test-id='beacon-status-stop-beacon'
kind='link'
onClick={onStopSharing}
className='mx_BeaconStatus_destructiveButton'
className='mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton'
disabled={stoppingInProgress}
>
{_t('Stop')}
{ _t('Stop') }
</AccessibleButton>
}
{hasWireError && <AccessibleButton
{ hasWireError && <AccessibleButton
data-test-id='beacon-status-reset-wire-error'
kind='link'
onClick={onResetWireError}
className='mx_BeaconStatus_destructiveButton'
className='mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton'
>
{_t('Retry')}
{ _t('Retry') }
</AccessibleButton>
}
{hasStopSharingError && <AccessibleButton
{ hasStopSharingError && <AccessibleButton
data-test-id='beacon-status-stop-beacon-retry'
kind='link'
onClick={onStopSharing}
className='mx_BeaconStatus_destructiveButton'
className='mx_OwnBeaconStatus_button mx_OwnBeaconStatus_destructiveButton'
>
{_t('Retry')}
</AccessibleButton>}
{ _t('Retry') }
</AccessibleButton> }
</BeaconStatus>;
};

Expand Down

0 comments on commit b94f099

Please sign in to comment.