@@ -6,20 +6,21 @@ import withStateChecked from '@ids-internal/hoc/withStateChecked';
66
77import { AltRadioProps } from './AltRadio.types' ;
88
9- const AltRadio = ( { className = '' , label, ...inputProps } : AltRadioProps ) => {
9+ const AltRadio = ( { className = '' , label, tileClassName = '' , title = '' , ...inputProps } : AltRadioProps ) => {
1010 const { checked = false , disabled = false , error = false , onBlur, onChange, onFocus, onInput } = inputProps ;
1111 const inputRef = useRef < HTMLInputElement > ( null ) ;
1212 const [ isFocused , setIsFocused ] = useState ( false ) ;
1313 const altRadioClassName = createCssClassNames ( {
1414 'ids-alt-radio' : true ,
15- [ className ] : true ,
15+ [ className ] : ! ! className ,
1616 } ) ;
1717 const altRadioTileClassName = createCssClassNames ( {
1818 'ids-alt-radio__tile' : true ,
1919 'ids-alt-radio__tile--checked' : checked ,
2020 'ids-alt-radio__tile--disabled' : disabled ,
2121 'ids-alt-radio__tile--error' : error ,
2222 'ids-alt-radio__tile--focused' : isFocused ,
23+ [ tileClassName ] : ! ! tileClassName ,
2324 } ) ;
2425 const onTileClick = ( ) => {
2526 inputRef . current ?. focus ( ) ;
@@ -39,7 +40,7 @@ const AltRadio = ({ className = '', label, ...inputProps }: AltRadioProps) => {
3940 } ;
4041
4142 return (
42- < div className = { altRadioClassName } >
43+ < div className = { altRadioClassName } title = { title } >
4344 < div className = "ids-alt-radio__source" >
4445 < BaseChoiceInput
4546 { ...inputProps }
0 commit comments