Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/buttons/SignInButton/SignInButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ const useStyles = makeStyles((theme) => ({
export const SignInButton = (props) => {
const classes = useStyles();

const { id, label = 'Sign in', logo = '../../assets/microsoft_logo.png', onClick } = props;
const { id, label = 'Sign in', logo = '../../assets/microsoft_logo.png', onClick, autoFocus = false } = props;

return (
<button className={classes.root} onClick={onClick} data-cy={'sign-in-with-' + id + '-button'}>
<button className={classes.root} onClick={onClick} data-cy={'sign-in-with-' + id + '-button'} autoFocus={autoFocus}>
<Grid container spacing={0} direction="row" sx={{ alignItems: 'center', justifyContent: 'flex-start' }}>
<Grid>
<Avatar className={classes.logo} variant="square" src={logo} />
Expand Down Expand Up @@ -70,4 +70,8 @@ SignInButton.propTypes = {
* - Custom one: to do this, use the **Auth.js** file (defined in @cosmotech/core package) as pattern
*/
onClick: PropTypes.func.isRequired,
/**
* Autofocus by default
*/
autoFocus: PropTypes.bool,
};