-
Notifications
You must be signed in to change notification settings - Fork 73
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
How to add text after Spinner ? #65
Comments
const LoadingSpinner = () => (
Processing...!!!
)
I tried Text inside the spinner component and its not working |
Just wrap it in a custom component that displays the spinner and text below it. This component is a spinner, it's not a loading progress component with optional text below it. Text styling is individual to every project so it would be rather difficult and pointless to add support for it. An example: import * as React from 'react';
import * as Spinner from 'react-spinkit';
import './styles.css';
interface ILoaderProps {
text?: string;
}
export class PageLoader extends React.Component<ILoaderProps, {}> {
// default component properties
public static defaultProps: Partial<ILoaderProps> = {
text: '',
};
/**
* Render the element
*
* @return {JSX.Element}
*/
public render(): JSX.Element {
let {text} = this.props;
return (
<div className="loader">
<div className="loader-content">
<Spinner name="wandering-cubes" />
<div className="loader-message">{text}</div>
</div>
</div>
);
}
} styles.css .loader {
background-color: #ffffff;
bottom: 0;
left: 0;
opacity: 0.8;
position: absolute;
right: 0;
top: 0;
}
.loader,
.loader-content {
display: flex;
align-items: center;
justify-content: center;
}
.loader-message {
font-size: 0.9em;
margin-top: 1em;
} Something along these lines... |
helpful!! thankyou |
I'm trying to add text to the Spinner component please let me know if any one of you know ?
The text was updated successfully, but these errors were encountered: