-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat(FE): Centre aligning loading spinner with new Spinning Indicator #224
Conversation
import { LoadingOutlined } from '@ant-design/icons'; | ||
const antIcon = <LoadingOutlined style={{ fontSize: 24 }} spin />; | ||
|
||
const SpinerStyle = styled.div` |
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.
This will fail if we want to add spinner inside a Modal or a section since it uses position fixed.
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.
Let's check if we can use some components from antd solving our purpose for div. Maybe Grid? https://ant.design/components/grid/
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.
@jyash97 have checked in the modal ya its working fine screenshot
or did i need to remove the position property itself or i hv to use relative ?
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.
@nidhi-tandon instead styled.div r u referring styles.Row nidhini? is it correct ?
right: 0; | ||
`; | ||
|
||
export const CustomSpinner = ({ |
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.
Can we have just Spinner component and pass props for different styles?
Also cant we just use Antd approach: https://codesandbox.io/s/ye0e6
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.
@jyash97 is like boolean props name as defaultSpiner type as boolean .Based boolean we have to render the Spinner indicator right yash?
tip, | ||
}:{ | ||
size:string, | ||
tip:string, |
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.
Lets name this message
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.
sure!
tip:string, | ||
})=>{ | ||
return( | ||
<> |
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.
We dont need a fragment here
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.
cool
|
||
export const DefaultSpinner = ()=>{ | ||
return( | ||
<> |
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.
Same no fragment here
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.
;)
import { useThemeSwitcher } from "react-css-theme-switcher"; | ||
import ROUTES from "Src/constants/routes"; | ||
import { IS_LOGGED_IN } from "Src/constants/auth"; | ||
import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom"; | ||
import { CustomSpinner } from "./../components/Spiner"; |
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.
Can we import from: Src/components/..
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.
i didn't get this @jyash97 can u elaborate!
position: fixed; | ||
z-index: 999; | ||
height: 4em; | ||
// width: 4em; |
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.
Please remove commented code
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.
yup sure
@nidhi-tandon @jyash97 @Vimalraj571 please check whether your input is pending in this PR. Let's try to merge this PR by the weekend. |
Fixes #223 |
feat: Added new Spinner Component,Changed the Old Spinner indicator and also added the spinner on Center.
BREAKING CHANGE: Removed the old Spinner style and replaced with new Spinner Component
see the issue for details
Refs #223