@atlaskit/tile
요소를 타일 모양으로 표시하기 위한 크기와 모서리 반경(radii) 속성이 내장된, 다용도의 기초 컨테이너 컴포넌트예요.
출처: 문서
본문
Tile 컴포넌트
타일은 요소를 타일 모양으로 표시하기 위한 크기와 모서리 반경(radii) 속성이 내장된, 다용도의 기초 컨테이너예요.
- Keywords: tile, icon, container, avatar, asset, emoji, logo, shape
- Categories: images and icons
- Status: general-availability
예시
import Tile from '@atlaskit/tile/tile';
export default function Basic(): React.JSX.Element {
const insetCloudSVG = (
<svg width="33" height="23" viewBox="0 0 33 23" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fillRule="evenodd"
clipRule="evenodd"
d="M13.8077 2.44412C14.8395 1.37 16.2756 0.704854 17.8621 0.704854C19.9774 0.704854 21.8106 1.88003 22.7978 3.63104C23.674 3.23933 24.6231 3.03709 25.583 3.03758C29.3905 3.03758 32.4812 6.1518 32.4812 9.99462C32.4812 13.8375 29.3905 16.9517 25.583 16.9517C25.1176 16.9517 24.664 16.9049 24.2198 16.8165C23.356 18.356 21.7049 19.4019 19.8246 19.4019C19.0591 19.4034 18.3033 19.2298 17.6153 18.8942C16.7398 20.9508 14.7008 22.3963 12.327 22.3963C9.84735 22.3963 7.74379 20.8333 6.93291 18.6357C6.57201 18.7119 6.20415 18.7501 5.8353 18.7499C2.88561 18.7499 0.5 16.3291 0.5 13.3559C0.5 11.3581 1.57411 9.6188 3.16765 8.67866C2.82958 7.89987 2.65556 7.05979 2.65645 6.21079C2.65645 2.77928 5.44162 0.00585938 8.87313 0.00585938C10.8827 0.00585938 12.6807 0.963628 13.8089 2.45023"
fill="#00A1E0"
/>
</svg>
);
return (
<Tile label="" backgroundColor="color.background.neutral" hasBorder testId="tile">
{insetCloudSVG}
</Tile>
);
}
Props
| Prop | Type | Description |
|---|---|---|
backgroundColor |
"black" | "white" | "transparent" | "color.background.accent.lime.subtlest" | "color.background.accent.lime.subtler" | "color.background.accent.lime.subtle" | "color.background.accent.lime.bolder" | ... 51 more ... | "color.background.information.bold" |
The background color of the tile |
children |
string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |
The asset to be displayed inside the tile |
hasBorder |
boolean |
Whether the tile has a border |
isInset |
boolean |
Whether the tile applies internal inset / padding |
label |
string |
The label for the icon (required) |
size |
"small" | "xxsmall" | "xsmall" | "medium" | "large" | "xlarge" |
The size of the tile |