Skip to content

Commit

Permalink
docs: Better mobile design for the playground. Initial implementation…
Browse files Browse the repository at this point in the history
… complete
  • Loading branch information
nmn committed Jan 3, 2025
1 parent d38ee2d commit 80992ce
Show file tree
Hide file tree
Showing 4 changed files with 365 additions and 97 deletions.
46 changes: 46 additions & 0 deletions apps/docs/components/LoadingSpinner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/

import * as React from 'react';
import * as stylex from '@stylexjs/stylex';

const spin = stylex.keyframes({
'0%': { transform: 'rotate(0deg)' },
'100%': { transform: 'rotate(360deg)' },
});

const styles = stylex.create({
spinner: {
width: 40,
height: 40,
borderWidth: 4,
borderStyle: 'solid',
borderColor: 'var(--ifm-color-emphasis-200)',
borderTopColor: 'var(--ifm-color-primary)',
borderRadius: '50%',
animationName: spin,
animationDuration: '1s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear',
},
container: {
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
minHeight: 200,
},
});

export default function LoadingSpinner() {
return (
<div {...stylex.props(styles.container)}>
<div {...stylex.props(styles.spinner)} />
</div>
);
}
Loading

0 comments on commit 80992ce

Please sign in to comment.