REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 3.05 KB
Close
//proc/thread-self/root/home/byroehnu/.trash/node_modules11/@adminjs/design-system/src/atoms/box/box.tsx
Text
Base64
import { PropsWithChildren } from 'react' import { space, SpaceProps, color, layout, LayoutProps, flexbox, FlexboxProps, border, BorderProps, position, PositionProps, variant, grid, shadow, ShadowProps, BorderRadiusProps, borderRadius, } from 'styled-system' import { styled } from '@styled-components' import { NewColorProps as ColorProps } from '../../utils/color-props.js' import { cssClass } from '../../utils/css-class.js' type FlexboxFlexProp = boolean | FlexboxProps['flex'] /** * @load ./box-props.doc.md * @memberof Box * @alias BoxProps * @property {string} [...] Other props from {@link SpaceProps}, {@link ColorProps}, * {@link LayoutProps}, {@link FlexboxProps}, * {@link PositionProps} and {@link BorderProps}. */ export type BoxProps = PropsWithChildren & BorderProps & BorderRadiusProps & ColorProps & LayoutProps & Omit<FlexboxProps, 'flex'> & PositionProps & ShadowProps & SpaceProps & { /** If box should be rendered as flex. You can pass boolean or FlexboxProps['flex'] */ flex?: FlexboxFlexProp /** Box variants */ variant?: 'grey' | 'white' | 'card' | 'transparent' | 'container' /** If set to true it makes css changes as 500ms transitions */ animate?: boolean /** Optional class name passed down to the wrapper */ className?: string } const variants = variant<BoxProps>({ variants: { grey: { flexGrow: 1, bg: 'bg', py: 'xl', px: ['0', 'xl'], className: cssClass(['Box', 'Box_Grey']), }, container: { flexGrow: 1, bg: 'container', py: 'xl', px: ['0', 'xl'], className: cssClass(['Box', 'Box_Container']), borderRadius: 8, }, white: { px: ['default', 'xxl'], py: 'xxl', bg: 'white', className: cssClass(['Box', 'Box_White']), }, card: { p: 'xxl', bg: 'white', className: cssClass(['Box', 'Box_Card']), boxShadow: 'card', }, transparent: { px: ['default', 'xxl'], py: 'xxl', bg: 'transparent', className: cssClass(['Box', 'Box_Transparent']), }, }, }) /** * @load ./box.doc.md * @hideconstructor * @component * @subcategory Atoms * @section design-system * @see BoxProps * @see {@link https://storybook.adminjs.co/?path=/story/designsystem-atoms-box--simple-white-gray-wrapper StoryBook} */ const Box = styled.section<BoxProps>` box-sizing: border-box; min-width: 0; ${({ flex }): string => (flex && typeof flex === 'boolean' ? 'display: flex;' : '')} font-family: ${({ theme }) => theme.font}; line-height: ${({ theme }) => theme.lineHeights.default}; font-size: ${({ theme }) => theme.fontSizes.default}; font-weight: normal; ${({ animate }): string => (animate ? 'transition: all 500ms;' : '')}; ${space}; ${color}; ${layout}; ${flexbox}; ${grid}; ${border}; ${borderRadius} ${shadow}; ${position}; ${variants}; ` Box.defaultProps = { className: cssClass('Box'), } Box.displayName = 'Box' export { Box } export default Box
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
box-props.doc.md
324 B
lrw-r--r--
2026-02-28 00:31:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
box.doc.md
1.60 KB
lrw-r--r--
2026-02-28 00:31:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
box.stories.tsx
1.12 KB
lrw-r--r--
2026-02-28 00:31:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
box.tsx
3.05 KB
lrw-r--r--
2026-02-28 00:31:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
26 B
lrw-r--r--
2026-02-28 00:31:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).