Skip to content

Commit

Permalink
fix(community-input-group): Update min, max width and enable a11ly cl…
Browse files Browse the repository at this point in the history
…ose text
  • Loading branch information
zyl-edison-telus authored and theetrain committed Mar 20, 2020
1 parent e83d94a commit fcd9218
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/InputGroup/InputGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { InputGroupStyle, LabelStyle } from './style'
const InputGroup = ({
id,
className,
closeA11yText,
placeholder,
defaultValue,
buttonText,
Expand Down Expand Up @@ -60,7 +61,7 @@ const InputGroup = ({
/>
{!!inputValue && (
<Close
a11yText="Close"
a11yText={closeA11yText}
onClick={e => {
setInputValue('')
inputRef.current.focus()
Expand All @@ -86,6 +87,10 @@ InputGroup.propTypes = {
* The class name
*/
className: PropTypes.string,
/**
* The close a11y test
*/
closeA11yText: PropTypes.string,
/**
* The textbox placeholder
*/
Expand Down Expand Up @@ -127,6 +132,7 @@ InputGroup.propTypes = {
InputGroup.defaultProps = {
id: '',
className: '',
closeA11yText: 'Close',
placeholder: '',
defaultValue: '',
buttonText: '',
Expand Down
2 changes: 2 additions & 0 deletions packages/InputGroup/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const InputGroupStyle = styled.div(({ hasValue }) => ({
flexWrap: 'nowrap',
height: '52px',
width: '100%',
maxWidth: '768px',
minWidth: '384px',
borderRadius: '5px',
'&:hover': {
boxShadow: '0 0 0 1px #4B286D',
Expand Down

0 comments on commit fcd9218

Please sign in to comment.