import React from 'react'; import useShowStorybookCode from '@techytools/ui/hooks/useShowStorybookCode'; import CanvasContainer from '@techytools/ui/.storybook/components/CanvasContainer'; import CanvasStoryPadding from '@techytools/ui/.storybook/components/CanvasStoryPadding'; import Block from '.'; import CodeInline from '../CodeInline'; const style = (props) => ` padding: 1px 1.25rem 0.25rem 1.5rem; code: { color: var(--color-accent), } `; export default function (props) { useShowStorybookCode(); return (

A container for displaying any kind of content. The only default styles are{' '} {' '} and{' '} . To set custom styles, pass{' '} {' '} (string/function handled by Emotion, converted to reusable namespaced className) or{' '} {' '} (JS object applied as inline style to DOM element) .

By default, Block renders a div element. Pass{' '} {' '} to render any other HTML tag.

The main reason to use Block vs div is to utilize the ss and other custom props described in the table below.

); } export const code = `import Block from '@techytools/ui/components/Block'; const style = \` padding: 1px 1.25rem 0.25rem 1.5rem; code: { color: var(--color-accent), } \`

The most basic building block. Used as a "container" for styling content. Use any ss props documented in the table below 👇.

The className is not specific to this component. It can be applied to anything. Defined globally in styles/global/classes.css.

`;