UNPKG

@grafana/ui

Version:
1 lines 1.13 kB
{"version":3,"file":"Space.mjs","sources":["../../../../src/components/Layout/Space.tsx"],"sourcesContent":["import { ThemeSpacingTokens } from '@grafana/data';\n\nimport { Box } from './Box/Box';\nimport { ResponsiveProp } from './utils/responsiveness';\n\nexport interface SpaceProps {\n /**\n * The amount of vertical space to use.\n */\n v?: ResponsiveProp<ThemeSpacingTokens>;\n /**\n * The amount of horizontal space to use.\n */\n h?: ResponsiveProp<ThemeSpacingTokens>;\n /**\n * The layout of the space. If set to `inline`, the component will behave like an inline-block element,\n * otherwise it will behave like a block element.\n */\n layout?: 'block' | 'inline';\n}\n\nexport const Space = ({ v = 0, h = 0, layout }: SpaceProps) => {\n return <Box paddingRight={h} paddingBottom={v} display={layout === 'inline' ? 'inline-block' : 'block'} />;\n};\n"],"names":[],"mappings":";;;AAqBa,MAAA,KAAA,GAAQ,CAAC,EAAE,CAAA,GAAI,GAAG,CAAI,GAAA,CAAA,EAAG,QAAyB,KAAA;AAC7D,EAAO,uBAAA,GAAA,CAAC,GAAI,EAAA,EAAA,YAAA,EAAc,CAAG,EAAA,aAAA,EAAe,GAAG,OAAS,EAAA,MAAA,KAAW,QAAW,GAAA,cAAA,GAAiB,OAAS,EAAA,CAAA;AAC1G;;;;"}