Skip to content

Commit

Permalink
Add inputAdorment to the live tile for repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
RodriSanchez1 committed Nov 23, 2023
1 parent 7efb21f commit 7a5ce9b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/components/Board/Symbol/Symbol.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
left: 0;
}

.liveInput .MuiInputBase-input::-webkit-scrollbar {
display: none;
}

.MuiInputAdornment-positionEnd .Symbol__repeat-button {
margin: 0px 3px 0px -5px;
padding: 1em 0em;
border-radius: 0%;
}

.Tile .Symbol {
padding-top: var(--folder-flap-height);
padding-bottom: 0.2em;
Expand Down
18 changes: 17 additions & 1 deletion src/components/Board/Symbol/Symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import PropTypes from 'prop-types';
import classNames from 'classnames';
import { isCordova } from '../../../cordova-util';
import OutlinedInput from '@material-ui/core/OutlinedInput';
import InputAdornment from '@material-ui/core/InputAdornment';
import IconButton from '@material-ui/core/IconButton';
import RepeatIcon from '@material-ui/icons/Repeat';

import messages from '../Board.messages';

import { LABEL_POSITION_BELOW } from '../../Settings/Display/Display.constants';
Expand Down Expand Up @@ -95,10 +99,22 @@ function Symbol(props) {
fullWidth={true}
onKeyPress={handleKeyPress}
style={{
padding: '0.5em 0.8em 0.5em 0.8em',
padding: '0.5em 0em 0.5em 0.8em',
height: '100%'
}}
className={'liveInput'}
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="repeat sentence"
onClick={onRepeatSentence()}
edge="end"
className="Symbol__repeat-button"
>
<RepeatIcon />
</IconButton>
</InputAdornment>
}
/>
)}
{props.type !== 'live' &&
Expand Down

0 comments on commit 7a5ce9b

Please sign in to comment.