본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

@atlaskit/object

원문 보기 위키 갱신

Atlassian 스토리(story)나 화이트보드(whiteboard) 콘텐츠 유형을 나타내는 오브젝트 아이콘 및 타일 컴포넌트들이에요.

출처: 문서

본문

StoryObject 컴포넌트

Atlassian 스토리 콘텐츠 유형을 나타내는 오브젝트 아이콘 컴포넌트예요.

  • Keywords: object, icon, content type, tile, object tile, atlassian
  • Categories: images and icons
  • Status: general-availability

예시

/**
 * @jsxRuntime classic
 * @jsx jsx
 */
import { css, jsx } from '@atlaskit/css';
import Heading from '@atlaskit/heading/heading';
import type { ObjectProps } from '@atlaskit/object/types';
import { Flex } from '@atlaskit/primitives/compiled/flex';
import { Inline } from '@atlaskit/primitives/compiled/inline';
import { Stack } from '@atlaskit/primitives/compiled/stack';
import { allObjects } from '../examples-utils/all-objects';
type ObjectSize = NonNullable<ObjectProps['size']>;
const containerStyles = css({
	maxWidth: '600px',
});
export default function Objects(): JSX.Element {
	const sizes: ObjectSize[] = ['small', 'medium'];
	return (
		<div css={containerStyles}>
			<Flex gap="space.300" wrap="wrap">
				{allObjects.map((ObjectComponent) => {
					const objectName = ObjectComponent.name;
					return (
						<Stack key={objectName} space="space.100">
							<Heading size="xsmall">{objectName}</Heading>
							<Inline space="space.150" alignBlock="center">
								{sizes.map((size) => (
									<ObjectComponent key={`${objectName}-${size}`} size={size} />
								))}
							</Inline>
						</Stack>
					);
				})}
			</Flex>
		</div>
	);
}

Props

Prop Type Description
label string The label for the object
size "small" | "medium" The size of the object

WhiteboardObjectTile 컴포넌트

Atlassian 화이트보드 콘텐츠 유형을 나타내는 오브젝트 타일 컴포넌트예요.

  • Keywords: object, icon, content type, tile, object tile, atlassian
  • Categories: images and icons
  • Status: general-availability

예시

/**
 * @jsxRuntime classic
 * @jsx jsx
 */
import { css, jsx } from '@atlaskit/css';
import Heading from '@atlaskit/heading/heading';
import type { ObjectTileProps } from '@atlaskit/object/types';
import { Flex } from '@atlaskit/primitives/compiled/flex';
import { Inline } from '@atlaskit/primitives/compiled/inline';
import { Stack } from '@atlaskit/primitives/compiled/stack';
import { allObjectTiles } from '../examples-utils/all-object-tiles';
type ObjectTileSize = NonNullable<ObjectTileProps['size']>;
const containerStyles = css({
	maxWidth: '980px',
});
export default function ObjectTiles(): JSX.Element {
	const sizes: ObjectTileSize[] = ['xsmall', 'small', 'medium', 'large', 'xlarge'];
	return (
		<div css={containerStyles}>
			<Flex gap="space.400" wrap="wrap">
				{allObjectTiles.map((ObjectTileComponent) => {
					const objectName = ObjectTileComponent.name;
					return (
						<Stack key={objectName} space="space.100">
							<Heading size="medium">{objectName}</Heading>
							<Inline space="space.200" alignBlock="center">
								{sizes.flatMap((size) => [
									<ObjectTileComponent
										key={`${objectName}-${size}-normal`}
										size={size}
										isBold={false}
									/>,
									<ObjectTileComponent
										key={`${objectName}-${size}-bold`}
										size={size}
										isBold={true}
									/>,
								])}
							</Inline>
						</Stack>
					);
				})}
			</Flex>
		</div>
	);
}

Props

Prop Type Description
isBold boolean Whether the object tile should be bold in appearance
label string The label for the object tile
size "small" | "xsmall" | "medium" | "large" | "xlarge" The size of the tile

더 알아보기 (Learn more)