mirror of
https://github.com/strapi/strapi.git
synced 2025-12-24 05:34:33 +00:00
Migrated LoadingIndicatorPage component to new DS
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
3468cbfa35
commit
fc9b84166b
@ -1,3 +1,5 @@
|
||||
import { ThemeProvider, lightTheme } from '@strapi/parts';
|
||||
|
||||
export const parameters = {
|
||||
actions: { argTypesRegex: '^on[A-Z].*' },
|
||||
controls: {
|
||||
@ -7,3 +9,13 @@ export const parameters = {
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const decorators = [
|
||||
Story => (
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<main>
|
||||
<Story />
|
||||
</main>
|
||||
</ThemeProvider>
|
||||
),
|
||||
];
|
||||
|
||||
@ -3,6 +3,7 @@ const defaultPresets = [
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: 'commonjs',
|
||||
loose: true,
|
||||
},
|
||||
],
|
||||
];
|
||||
@ -10,7 +11,9 @@ const defaultPresets = [
|
||||
module.exports = {
|
||||
presets: defaultPresets.concat(['@babel/preset-react', '@babel/preset-flow']),
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
['@babel/plugin-proposal-class-properties', { loose: true }],
|
||||
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
|
||||
['@babel/plugin-proposal-private-methods', { loose: true }],
|
||||
'@babel/plugin-proposal-export-default-from',
|
||||
'@babel/plugin-proposal-export-namespace-from',
|
||||
'@babel/plugin-proposal-function-bind',
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
<!--- LoadingIndicatorPage.stories.mdx --->
|
||||
|
||||
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
|
||||
import LoadingIndicatorPage from './index';
|
||||
|
||||
<Meta title="components/LoadingIndicatorPage" component={LoadingIndicatorPage} />
|
||||
|
||||
# LoadingIndicatorPage
|
||||
|
||||
This is the doc of the `LoadingIndicatorPage` component
|
||||
|
||||
## LoadingIndicatorPage
|
||||
|
||||
Description...
|
||||
|
||||
<Canvas>
|
||||
<Story name="base">
|
||||
<LoadingIndicatorPage data-testid="loader" />
|
||||
</Story>
|
||||
</Canvas>
|
||||
@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import { Loader } from '@strapi/parts/Loader';
|
||||
import { Row } from '@strapi/parts/Row';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const LoadingIndicatorPage = ({ 'data-testid': dataTestId, ...rest }) => {
|
||||
return (
|
||||
<Row justifyContent="space-around" data-testid={dataTestId}>
|
||||
<Loader>Loading content.</Loader>
|
||||
</Row>
|
||||
);
|
||||
};
|
||||
|
||||
LoadingIndicatorPage.defaultProps = {
|
||||
'data-testid': 'loader',
|
||||
};
|
||||
|
||||
LoadingIndicatorPage.propTypes = {
|
||||
'data-testid': PropTypes.string,
|
||||
};
|
||||
|
||||
export default LoadingIndicatorPage;
|
||||
@ -67,7 +67,6 @@ export { default as ListTitle } from './old/components/ListTitle';
|
||||
|
||||
export { default as LoadingBar } from './old/components/LoadingBar';
|
||||
export { default as LoadingIndicator } from './old/components/LoadingIndicator';
|
||||
export { default as LoadingIndicatorPage } from './old/components/LoadingIndicatorPage';
|
||||
|
||||
export { default as ModalConfirm } from './old/components/ModalConfirm';
|
||||
export { default as Modal } from './old/components/Modal';
|
||||
@ -175,3 +174,4 @@ export { default as SearchIcon } from './old/svgs/Search';
|
||||
export { default as CheckPagePermissions } from './components/CheckPagePermissions';
|
||||
export { default as CheckPermissions } from './components/CheckPermissions';
|
||||
export * from './components/InjectionZone';
|
||||
export { default as LoadingIndicatorPage } from './components/LoadingIndicatorPage';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user