Usage
import { Tile } from 'nr1'
Examples
Basic tile
<Tile onClick={console.log}> <HeadingText type={HeadingText.TYPE.HEADING_6}> Single location failure </HeadingText> <BlockText> Check your company’s style guides. Great copy that doesn’t fit with the rest of the interface or marketing materials can be jarring to users. </BlockText></Tile>
Disabled tile
<Tile onClick={console.log} disabled> <HeadingText type={HeadingText.TYPE.HEADING_6}> Single location failure </HeadingText> <BlockText> Check your company’s style guides. Great copy that doesn’t fit with the rest of the interface or marketing materials can be jarring to users. </BlockText></Tile>
Link tile
<Tile to="https://login.newrelic.com/login">Login</Tile>
Sizes
<Stack> <StackItem> <Tile sizeType={Tile.SIZE_TYPE.SMALL} onClick={console.log}> <HeadingText type={HeadingText.TYPE.HEADING_6}> Single location failure </HeadingText> <BlockText> Check your company’s style guides. Great copy that doesn’t fit with the rest of the interface or marketing materials can be jarring to users. </BlockText> </Tile> </StackItem> <StackItem> <Tile sizeType={Tile.SIZE_TYPE.MEDIUM} onClick={console.log}> <HeadingText type={HeadingText.TYPE.HEADING_6}> Single location failure </HeadingText> <BlockText> Check your company’s style guides. Great copy that doesn’t fit with the rest of the interface or marketing materials can be jarring to users. </BlockText> </Tile> </StackItem></Stack>
Types
<Stack> <StackItem> <Tile onClick={console.log} type={Tile.TYPE.PLAIN}> <HeadingText type={HeadingText.TYPE.HEADING_6}> Single location failure </HeadingText> <BlockText> Check your company’s style guides. Great copy that doesn’t fit with the rest of the interface or marketing materials can be jarring to users. </BlockText> </Tile> </StackItem> <StackItem> <Tile onClick={console.log} type={Tile.TYPE.OUTLINE}> <HeadingText type={HeadingText.TYPE.HEADING_6}> Single location failure </HeadingText> <BlockText> Check your company’s style guides. Great copy that doesn’t fit with the rest of the interface or marketing materials can be jarring to users. </BlockText> </Tile> </StackItem> <StackItem> <Tile onClick={console.log} type={Tile.TYPE.SOLID}> <HeadingText type={HeadingText.TYPE.HEADING_6}> Single location failure </HeadingText> <BlockText> Check your company’s style guides. Great copy that doesn’t fit with the rest of the interface or marketing materials can be jarring to users. </BlockText> </Tile> </StackItem></Stack>
Props
string | Use it to describe better the context of the component's action for users on screen readers. |
REQUIREDnode | Content to render inside the component. |
string | Appends class names to the component.Should be used only for positioning and spacing purposes. |
boolean | When |
function | Callback fired any time the user clicks on the tile. |
enum | Specifies the desired size of the tile (smaller sizes have less internal padding). |
enum[] | Spacing property. Spacing is defined as a tuple of zero to four values, which follow the same conventions as CSS properties like |
object | Inline style for custom styling.Should be used only for positioning and spacing purposes. |
string | Adds a |
shape|string | Location object or url string to link to. shape
REQUIREDstring
string
string |
enum | Type can be:
|
string|number | Unique identifier of the tile. Used by the |