-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SignInPage] Revamp slots #4574
base: master
Are you sure you want to change the base?
Changes from 9 commits
0171697
0cc237c
e703c98
bf0042f
a1b6be4
1ad8dad
253afec
cc831be
fe77c05
b28a2b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import * as React from 'react'; | ||
import Checkbox from '@mui/material/Checkbox'; | ||
import { AppProvider } from '@toolpad/core/AppProvider'; | ||
import { SignInPage } from '@toolpad/core/SignInPage'; | ||
import { SignInPage, RememberCheckbox } from '@toolpad/core/SignInPage'; | ||
import { useTheme } from '@mui/material/styles'; | ||
|
||
const providers = [{ id: 'credentials', name: 'Email and Password' }]; | ||
|
@@ -16,17 +16,19 @@ export default function SlotPropsSignIn() { | |
`Signing in with "${provider.name}" and credentials: ${formData.get('email')}, ${formData.get('password')} and checkbox value: ${formData.get('tandc')}`, | ||
) | ||
} | ||
slots={{ checkbox: RememberCheckbox }} | ||
slotProps={{ | ||
form: { noValidate: true }, | ||
emailField: { variant: 'standard', autoFocus: false }, | ||
passwordField: { variant: 'standard' }, | ||
submitButton: { variant: 'outlined' }, | ||
rememberMe: { | ||
checkbox: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I see we have a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, Agreed, I did feel that I would propose removing Wdyt? Also @Janpot and @prakhargupta1 Might make sense to move this to the next release and mark that as having a lot of breaking changes for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving those to "plug-in" components seems good to me if they're complex enough! |
||
control: ( | ||
<Checkbox | ||
name="tandc" | ||
value="true" | ||
color="primary" | ||
sx={{ padding: 0.5, '& .MuiSvgIcon-root': { fontSize: 20 } }} | ||
sx={{ py: 1, px: 0.5, '& .MuiSvgIcon-root': { fontSize: 20 } }} | ||
/> | ||
), | ||
color: 'textSecondary', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about
RememberMeCheckbox
, would it be just a bit more descriptive?