From f115de95e7a4268ef48852e3ecd3431bb584fbb8 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 4 Jul 2024 08:30:57 -0500 Subject: [PATCH] Add stories for login. --- .../src/auth/Login.stories.tsx | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/ra-ui-materialui/src/auth/Login.stories.tsx diff --git a/packages/ra-ui-materialui/src/auth/Login.stories.tsx b/packages/ra-ui-materialui/src/auth/Login.stories.tsx new file mode 100644 index 00000000000..3a2bcb1043f --- /dev/null +++ b/packages/ra-ui-materialui/src/auth/Login.stories.tsx @@ -0,0 +1,33 @@ +import * as React from 'react'; +import AccountBoxIcon from '@mui/icons-material/AccountBox'; +import { AdminContext } from '../AdminContext'; +import { Login } from './Login'; + +export default { title: 'ra-ui-materialui/auth/Login' }; + +export const DefaultLogin = () => { + return ( + + + + ); +}; + +export const CustomIcon = () => { + return ( + + } /> + + ); +}; + +const Wrapper = ({ children }) => { + const authProvider = { + login: () => Promise.resolve(), + logout: () => Promise.resolve(), + checkAuth: () => Promise.reject(), + checkError: () => Promise.resolve(), + getPermissions: () => Promise.resolve(), + }; + return {children}; +};