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

Commit

Permalink
[Issue #1] add FAB_ICON_ONLY variable to remove text from live chat w…
Browse files Browse the repository at this point in the history
…idget
  • Loading branch information
Gregory Emirian committed Feb 13, 2020
1 parent 4d92be8 commit 7ae90e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import {
Chat as ChatIcon
} from '@material-ui/icons';

const { UNREAD_MESSAGES_FAB_TEXT, FAB_TEXT } = process.enve;
const { UNREAD_MESSAGES_FAB_TEXT, FAB_TEXT, FAB_ICON_ONLY } = process.enve;

const useStyles = makeStyles(theme =>
createStyles({
hiddenFab: {
transform: 'translate(0, 150%)'
},
fabIcon: {
marginRight: theme.spacing()
marginRight: FAB_ICON_ONLY ? '0' : theme.spacing()
},
fab: {
transition: '0.5s',
Expand Down Expand Up @@ -54,7 +54,7 @@ export function ChatButton({ onOpen, alert, show }: ChatButtonProps) {
aria-label={FAB_TEXT}
>
<ChatIcon className={classes.fabIcon} />
{FAB_TEXT}
{FAB_ICON_ONLY ? '' : FAB_TEXT}
</Fab>
);
}
2 changes: 2 additions & 0 deletions web/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ STATIC_PATH="/static/"

FAB_ON_RIGHT=true

FAB_ICON_ONLY=false

YALCS_API_URL="https://example.com/yalcs/api"

UNREAD_MESSAGES_FAB_TEXT="Unread messages!"
Expand Down

0 comments on commit 7ae90e5

Please sign in to comment.