Skip to content

Commit 257e7f7

Browse files
Namespaced CSS (#14)
* Namespaced CSS * Remove ids * Fix typo * Fix * Fix * Fix * Fix * Run linter * Remove global tag rules * Small review changes --------- Co-authored-by: Greg <[email protected]>
1 parent 6cd1dd2 commit 257e7f7

21 files changed

+170
-178
lines changed

src/components/Avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type AvatarProps = {
55
};
66

77
const Avatar = ({ children }: AvatarProps) => {
8-
return <div className="avatar">{children}</div>;
8+
return <div className="jlab-gather-avatar">{children}</div>;
99
};
1010

1111
export default Avatar;

src/components/ControlBar.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ const ControlBar = () => {
3333
};
3434

3535
return (
36-
<div id="control-bar" className="control-bar">
37-
<button className="btn-control" onClick={toggleAudio}>
36+
<div id="jlab-gather-control-bar" className="jlab-gather-control-bar">
37+
<button className="jlab-gather-btn-control" onClick={toggleAudio}>
3838
{isLocalAudioEnabled ? 'Mute' : 'Unmute'}
3939
</button>
4040

41-
<button className="btn-control" onClick={toggleVideo}>
41+
<button className="jlab-gather-btn-control" onClick={toggleVideo}>
4242
{isLocalVideoEnabled ? 'Hide' : 'Unhide'}
4343
</button>
4444

@@ -50,8 +50,7 @@ const ControlBar = () => {
5050
<SettingsButton />
5151

5252
<button
53-
id="leave-btn"
54-
className="btn-common btn-danger"
53+
className="jlab-gather-btn-common jlab-gather-btn-danger"
5554
onClick={handleLeave}
5655
>
5756
Leave Room

src/components/DeviceSettings.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ const Select = ({
6060
<div>
6161
<span>{title}:</span>
6262
{list?.length ? (
63-
<select onChange={onChange} value={value}>
63+
<select
64+
className="jlab-gather-select"
65+
onChange={onChange}
66+
value={value}
67+
>
6468
{list.map((device: any) => (
6569
<option value={device.deviceId} key={device.deviceId}>
6670
{device.label}

src/components/ModelListItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const ModelListItem = ({ model, handleClick, className }: IModelListItem) => {
1212
return (
1313
<Button
1414
minimal
15-
className={`${className} model-list-item`}
15+
className={`${className} jlab-gather-model-list-item`}
1616
onClick={() => handleClick(model)}
1717
>
1818
{model.name}

src/components/Peer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,24 @@ const Peer = ({ peer, className, dimension }: IPeer) => {
2929
};
3030

3131
return (
32-
<div className={'peer-tile'}>
32+
<div className={'jlab-gather-peer-tile'}>
3333
{peer.isHandRaised ? (
34-
<Icons.raisedHand className="peer-hand-raised-icon" />
34+
<Icons.raisedHand className="jlab-gather-peer-hand-raised-icon" />
3535
) : (
3636
''
3737
)}
3838
{isLocalVideoEnabled ? (
3939
<>
4040
<video
4141
ref={videoRef}
42-
className={`${className} ${peer.isHandRaised ? 'peer-hand-raised' : ''}`}
42+
className={`${className} ${peer.isHandRaised ? 'jlab-gather-peer-hand-raised' : ''}`}
4343
autoPlay
4444
muted
4545
playsInline
4646
height={dimension}
4747
width={dimension}
4848
/>
49-
<div className="peer-name">{peer.name}</div>
49+
<div className="jlab-gather-peer-name">{peer.name}</div>
5050
</>
5151
) : (
5252
<Avatar>{getInitials(peer.name)}</Avatar>

src/components/PeerSidePane.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ interface IPeerSidePane {
88

99
const PeerSidePane = ({ peers }: IPeerSidePane) => {
1010
return (
11-
<div className="peer-sidepane-list">
11+
<div className="jlab-gather-peer-sidepane-list">
1212
{peers.map(peer => (
1313
<Peer
1414
key={peer.id}
1515
peer={peer}
16-
className="peer-video"
16+
className="jlab-gather-peer-video"
1717
dimension={128}
1818
/>
1919
))}

src/components/buttons/PluginButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const PluginButton = () => {
7171

7272
return (
7373
<button
74-
className="btn-control"
74+
className="jlab-gather-btn-control"
7575
onClick={togglePlugin}
7676
disabled={isDisabled}
7777
>

src/components/buttons/RaiseHandButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const RaiseHandButton = () => {
2121
}, [hmsActions, isHandRaised]);
2222

2323
return (
24-
<button className="btn-control" onClick={toggleRaiseHand}>
24+
<button className="jlab-gather-btn-control" onClick={toggleRaiseHand}>
2525
<Icons.raisedHand
26-
className={`icon ${isHandRaised ? 'icon-breathe' : ''}`}
26+
className={`jlab-gather-icon ${isHandRaised ? 'jlab-gather-icon-breathe' : ''}`}
2727
/>
2828
</button>
2929
);

src/components/buttons/ScreenShareButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const ScreenShareButton = () => {
2626
};
2727

2828
return (
29-
<button className="btn-control" onClick={toggleScreenShare}>
29+
<button className="jlab-gather-btn-control" onClick={toggleScreenShare}>
3030
{isScreenShared ? 'Stop Sharing' : 'Share Screen'}
3131
</button>
3232
);

src/components/buttons/SettingsButton.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ const SettingsButton = () => {
1515

1616
return (
1717
<>
18-
<button className="btn-control" onClick={handleOpenDeviceSettingsModal}>
19-
<Icons.settings className="icon" />
18+
<button
19+
className="jlab-gather-btn-control"
20+
onClick={handleOpenDeviceSettingsModal}
21+
>
22+
<Icons.settings className="jlab-gather-icon" />
2023
</button>
2124
<DeviceSettingModal
2225
isOpen={isDeviceSettingsModalOpen}

0 commit comments

Comments
 (0)