Skip to content

Commit d733058

Browse files
authored
feat: add tooltips to toolbar buttons (#97)
1 parent b778cef commit d733058

File tree

1 file changed

+70
-51
lines changed

1 file changed

+70
-51
lines changed

src/components/FullPlayground.tsx

Lines changed: 70 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -771,60 +771,79 @@ export function ThemedAppView(props: { datastore: DataStore }) {
771771
)}
772772
</div>
773773
{AppConfig().discord.inviteUrl ? (
774-
<Button
775-
className={classes.hideTextOnMed}
776-
size="small"
777-
href={AppConfig().discord.inviteUrl}
778-
startIcon={
779-
<DISCORD
780-
viewBox="0 0 71 55"
781-
style={{ height: "1em", width: "1em" }}
782-
/>
783-
}
784-
>
785-
Discuss on Discord
786-
</Button>
774+
<Tooltip title="Discuss on Discord">
775+
<Button
776+
className={classes.hideTextOnMed}
777+
size="small"
778+
href={AppConfig().discord.inviteUrl}
779+
startIcon={
780+
<DISCORD
781+
viewBox="0 0 71 55"
782+
style={{ height: "1em", width: "1em" }}
783+
/>
784+
}
785+
>
786+
Discuss on Discord
787+
</Button>
788+
</Tooltip>
787789
) : (
788790
<span />
789791
)}
790-
<Button
791-
className={clsx(TourElementClass.share, classes.hideTextOnMed, {
792-
[classes.hide]: !isSharingEnabled,
793-
})}
794-
size="small"
795-
onClick={() => conductSharing()}
796-
disabled={
797-
sharingState.status === SharingStatus.SHARING ||
798-
validationState.status === ValidationStatus.RUNNING
799-
}
800-
startIcon={<ShareIcon />}
801-
>
802-
Share
803-
</Button>
804-
<Button
805-
className={classes.hideTextOnMed}
806-
size="small"
807-
onClick={conductDownload}
808-
disabled={
809-
sharingState.status === SharingStatus.SHARING ||
810-
validationState.status === ValidationStatus.RUNNING
811-
}
812-
startIcon={<GetAppIcon />}
813-
>
814-
Download
815-
</Button>
816-
<Button
817-
className={classes.hideTextOnMed}
818-
size="small"
819-
onClick={conductUpload}
820-
disabled={
821-
sharingState.status === SharingStatus.SHARING ||
822-
validationState.status === ValidationStatus.RUNNING
823-
}
824-
startIcon={<InsertDriveFileIcon />}
825-
>
826-
Load From File
827-
</Button>
792+
<Tooltip title="Share">
793+
<span
794+
className={clsx({
795+
[classes.hide]: !isSharingEnabled,
796+
})}
797+
>
798+
<Button
799+
className={clsx(
800+
TourElementClass.share,
801+
classes.hideTextOnMed,
802+
)}
803+
size="small"
804+
onClick={() => conductSharing()}
805+
disabled={
806+
sharingState.status === SharingStatus.SHARING ||
807+
validationState.status === ValidationStatus.RUNNING
808+
}
809+
startIcon={<ShareIcon />}
810+
>
811+
Share
812+
</Button>
813+
</span>
814+
</Tooltip>
815+
<Tooltip title="Download">
816+
<span>
817+
<Button
818+
className={classes.hideTextOnMed}
819+
size="small"
820+
onClick={conductDownload}
821+
disabled={
822+
sharingState.status === SharingStatus.SHARING ||
823+
validationState.status === ValidationStatus.RUNNING
824+
}
825+
startIcon={<GetAppIcon />}
826+
>
827+
Download
828+
</Button>
829+
</span>
830+
</Tooltip>
831+
<Tooltip title="Load From File">
832+
<span>
833+
<Button
834+
className={classes.hideTextOnMed}
835+
size="small"
836+
onClick={conductUpload}
837+
disabled={
838+
sharingState.status === SharingStatus.SHARING ||
839+
validationState.status === ValidationStatus.RUNNING
840+
}
841+
startIcon={<InsertDriveFileIcon />}
842+
>
843+
Load From File
844+
</Button>
845+
</span>
846+
</Tooltip>
828847
</>
829848
)}
830849
</AppBar>

0 commit comments

Comments
 (0)