Fix prettier
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -36,13 +36,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
|
||||
Avatar sizes can be set using the `size` prop.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Sizes />}
|
||||
code={sizesSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Sizes />} code={sizesSnippet} />
|
||||
|
||||
### Fallback
|
||||
|
||||
@@ -60,12 +54,7 @@ If the image is not available, the avatar will show the initials of the name.
|
||||
|
||||
Control how the avatar is announced to screen readers using the `purpose` prop.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<Purpose />}
|
||||
code={purposeSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} preview={<Purpose />} code={purposeSnippet} />
|
||||
|
||||
<Theming definition={AvatarDefinition} />
|
||||
|
||||
|
||||
@@ -48,13 +48,7 @@ Here's a view when buttons have different variants.
|
||||
|
||||
Here's a view when buttons have different sizes.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Sizes />}
|
||||
code={sizesSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Sizes />} code={sizesSnippet} />
|
||||
|
||||
### Disabled
|
||||
|
||||
|
||||
@@ -20,12 +20,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
description="A button component that can be used as a link."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<Variants />}
|
||||
code={variantsSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} preview={<Variants />} code={variantsSnippet} />
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -53,13 +48,7 @@ Here's a view when buttons have different variants.
|
||||
|
||||
Here's a view when buttons have different sizes.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Sizes />}
|
||||
code={sizesSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Sizes />} code={sizesSnippet} />
|
||||
|
||||
### With Icons
|
||||
|
||||
|
||||
@@ -24,12 +24,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
description="A card component that can be used to display content in a box."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<Default />}
|
||||
code={defaultSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} preview={<Default />} code={defaultSnippet} />
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import { Default, PreviewFixedWidthAndHeight, PreviewWithForm } from './components';
|
||||
import {
|
||||
Default,
|
||||
PreviewFixedWidthAndHeight,
|
||||
PreviewWithForm,
|
||||
} from './components';
|
||||
import {
|
||||
dialogPropDefs,
|
||||
dialogTriggerPropDefs,
|
||||
|
||||
@@ -36,7 +36,6 @@ The grid component also accepts all the spacing props from the Box component.
|
||||
|
||||
<PropsTable data={spacingPropDefs} />
|
||||
|
||||
|
||||
<Theming definition={GridDefinition} />
|
||||
|
||||
<ChangelogComponent component="grid" />
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
import { WithEverything, WithLongBreadcrumbs, WithTabs, WithCustomActions, WithMenuItems } from './components';
|
||||
import {
|
||||
WithEverything,
|
||||
WithLongBreadcrumbs,
|
||||
WithTabs,
|
||||
WithCustomActions,
|
||||
WithMenuItems,
|
||||
} from './components';
|
||||
import { propDefs } from './props-definition';
|
||||
import {
|
||||
usage,
|
||||
@@ -22,11 +28,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
description="A header page component for the plugin that should sit under the Header component."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
preview={<WithEverything />}
|
||||
code={defaultSnippet}
|
||||
/>
|
||||
<Snippet py={4} preview={<WithEverything />} code={defaultSnippet} />
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -43,44 +45,28 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
You can add breadcrumbs to the header page to help users navigate to the previous page. The `breadcrumbs`
|
||||
prop is an array of objects with a `label` and `href` property. By default we truncate the breadcrumb label to 240px.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<WithLongBreadcrumbs />}
|
||||
code={withBreadcrumbs}
|
||||
/>
|
||||
<Snippet open preview={<WithLongBreadcrumbs />} code={withBreadcrumbs} />
|
||||
|
||||
### With Tabs
|
||||
|
||||
You can add tabs to the header page to help users navigate to the different sections of the page. The `tabs`
|
||||
prop is an array of objects with a `label` and `href` property.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<WithTabs />}
|
||||
code={withTabs}
|
||||
/>
|
||||
<Snippet open preview={<WithTabs />} code={withTabs} />
|
||||
|
||||
### With Custom Actions
|
||||
|
||||
You can add custom actions to the header page to help users navigate to the different sections of the page. The `customActions`
|
||||
prop is a React node.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<WithCustomActions />}
|
||||
code={withCustomActions}
|
||||
/>
|
||||
<Snippet open preview={<WithCustomActions />} code={withCustomActions} />
|
||||
|
||||
### With Menu Items
|
||||
|
||||
You can add menu items to the header page to help users navigate to the different sections of the page. The `menuItems`
|
||||
prop is an array of objects with a `label`, `value` and `onClick` property.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<WithMenuItems />}
|
||||
code={withMenuItems}
|
||||
/>
|
||||
<Snippet open preview={<WithMenuItems />} code={withMenuItems} />
|
||||
|
||||
<Theming definition={HeaderPageDefinition} />
|
||||
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
import { WithAllOptionsAndTabs, WithAllOptions, WithBreadcrumbs, WithHeaderPage } from './components';
|
||||
import {
|
||||
WithAllOptionsAndTabs,
|
||||
WithAllOptions,
|
||||
WithBreadcrumbs,
|
||||
WithHeaderPage,
|
||||
} from './components';
|
||||
import { propDefs } from './props-definition';
|
||||
import {
|
||||
usage,
|
||||
@@ -22,11 +27,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
description="A header component for the plugin."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
preview={<WithAllOptionsAndTabs />}
|
||||
code={defaultSnippet}
|
||||
/>
|
||||
<Snippet py={4} preview={<WithAllOptionsAndTabs />} code={defaultSnippet} />
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -42,12 +43,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
|
||||
A simple example of how to use the Header component.
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
preview={<WithAllOptions />}
|
||||
code={simple}
|
||||
open
|
||||
/>
|
||||
<Snippet py={4} preview={<WithAllOptions />} code={simple} open />
|
||||
|
||||
### Header with tabs
|
||||
|
||||
@@ -65,21 +61,13 @@ open
|
||||
|
||||
Breacrumbs should appear when you scroll down (and not directly visible as it is in the demo below).
|
||||
|
||||
<Snippet
|
||||
preview={<WithBreadcrumbs />}
|
||||
code={withBreadcrumbs}
|
||||
open
|
||||
/>
|
||||
<Snippet preview={<WithBreadcrumbs />} code={withBreadcrumbs} open />
|
||||
|
||||
### Header with HeaderPage
|
||||
|
||||
You can use the `Header` component inside the [HeaderPage](/components/header-page) component to compose your multi-level navigation.
|
||||
|
||||
<Snippet
|
||||
preview={<WithHeaderPage />}
|
||||
code={withHeaderPage}
|
||||
open
|
||||
/>
|
||||
<Snippet preview={<WithHeaderPage />} code={withHeaderPage} open />
|
||||
|
||||
<Theming definition={HeaderDefinition} />
|
||||
|
||||
|
||||
@@ -10,7 +10,13 @@ import {
|
||||
allColorsSnippet,
|
||||
underlineSnippet,
|
||||
} from './snippets';
|
||||
import { Default, ExternalLink, AllVariants, AllColors, Underline } from './components';
|
||||
import {
|
||||
Default,
|
||||
ExternalLink,
|
||||
AllVariants,
|
||||
AllColors,
|
||||
Underline,
|
||||
} from './components';
|
||||
import { PageTitle } from '@/components/PageTitle';
|
||||
import { Theming } from '@/components/Theming';
|
||||
import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import { Preview, PreviewSubmenu, PreviewIcons, PreviewLinks, PreviewSections, PreviewSeparators, PreviewAutocompleteMenu, PreviewAutocompleteListbox, PreviewAutocompleteListboxMultiple } from './components';
|
||||
import {
|
||||
Preview,
|
||||
PreviewSubmenu,
|
||||
PreviewIcons,
|
||||
PreviewLinks,
|
||||
PreviewSections,
|
||||
PreviewSeparators,
|
||||
PreviewAutocompleteMenu,
|
||||
PreviewAutocompleteListbox,
|
||||
PreviewAutocompleteListboxMultiple,
|
||||
} from './components';
|
||||
import {
|
||||
menuTriggerPropDefs,
|
||||
submenuTriggerPropDefs,
|
||||
@@ -36,12 +46,7 @@ import { MenuDefinition } from '../../../utils/definitions';
|
||||
description="A list of actions in a dropdown, enhanced with keyboard navigation."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<Preview />}
|
||||
code={preview}
|
||||
/>
|
||||
<Snippet align="center" py={4} preview={<Preview />} code={preview} />
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -152,26 +157,14 @@ the submenu is displayed in the correct position. The best practice is to use th
|
||||
|
||||
You can use the `iconStart` prop to add an icon to the menu item.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<PreviewIcons />}
|
||||
code={icons}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<PreviewIcons />} code={icons} />
|
||||
|
||||
### With links
|
||||
|
||||
You can use the `href` prop to add a link to the menu item. This is using our router provider under the hood
|
||||
to work for both internal and external links.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<PreviewLinks />}
|
||||
code={links}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<PreviewLinks />} code={links} />
|
||||
|
||||
### With sections
|
||||
|
||||
|
||||
@@ -19,7 +19,12 @@ import { PasswordFieldDefinition } from '../../../utils/definitions';
|
||||
description="A password field component for your forms."
|
||||
/>
|
||||
|
||||
<Snippet align="center" py={4} preview={<WithLabel />} code={withLabelSnippet} />
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<WithLabel />}
|
||||
code={withLabelSnippet}
|
||||
/>
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -35,13 +40,7 @@ import { PasswordFieldDefinition } from '../../../utils/definitions';
|
||||
|
||||
We support two different sizes: `small`, `medium`.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Sizes />}
|
||||
code={sizesSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Sizes />} code={sizesSnippet} />
|
||||
|
||||
### With description
|
||||
|
||||
|
||||
@@ -14,12 +14,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
description="A popover displays floating content anchored to a trigger element with automatic positioning and collision detection."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<Default />}
|
||||
code={defaultSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} preview={<Default />} code={defaultSnippet} />
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -10,7 +10,14 @@ import {
|
||||
validationSnippet,
|
||||
readOnlySnippet,
|
||||
} from './snippets';
|
||||
import { Default, Horizontal, Disabled, DisabledSingle, Validation, ReadOnly } from './components';
|
||||
import {
|
||||
Default,
|
||||
Horizontal,
|
||||
Disabled,
|
||||
DisabledSingle,
|
||||
Validation,
|
||||
ReadOnly,
|
||||
} from './components';
|
||||
import { PageTitle } from '@/components/PageTitle';
|
||||
import { Theming } from '@/components/Theming';
|
||||
import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
|
||||
@@ -8,7 +8,12 @@ import {
|
||||
withDescriptionSnippet,
|
||||
startCollapsedSnippet,
|
||||
} from './snippets';
|
||||
import { WithLabel, Sizes, WithDescription, StartCollapsed } from './components';
|
||||
import {
|
||||
WithLabel,
|
||||
Sizes,
|
||||
WithDescription,
|
||||
StartCollapsed,
|
||||
} from './components';
|
||||
import { PageTitle } from '@/components/PageTitle';
|
||||
import { Theming } from '@/components/Theming';
|
||||
import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
@@ -20,7 +25,12 @@ import { SearchFieldDefinition } from '../../../utils/definitions';
|
||||
description="A SearchField is a text field designed for searches."
|
||||
/>
|
||||
|
||||
<Snippet align="center" py={4} preview={<WithLabel />} code={withLabelSnippet} />
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<WithLabel />}
|
||||
code={withLabelSnippet}
|
||||
/>
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -36,13 +46,7 @@ import { SearchFieldDefinition } from '../../../utils/definitions';
|
||||
|
||||
We support two different sizes: `small`, `medium`.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Sizes />}
|
||||
code={sizesSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Sizes />} code={sizesSnippet} />
|
||||
|
||||
### With description
|
||||
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import { Preview, WithLabelAndDescription, Sizes, WithIcon, Disabled, DisabledOption, Searchable, MultipleSelection, SearchableMultiple } from './components';
|
||||
import {
|
||||
Preview,
|
||||
WithLabelAndDescription,
|
||||
Sizes,
|
||||
WithIcon,
|
||||
Disabled,
|
||||
DisabledOption,
|
||||
Searchable,
|
||||
MultipleSelection,
|
||||
SearchableMultiple,
|
||||
} from './components';
|
||||
import { selectPropDefs } from './props-definition';
|
||||
import {
|
||||
selectUsageSnippet,
|
||||
|
||||
@@ -2,11 +2,7 @@ import { PropsTable } from '@/components/PropsTable';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import { skeletonPropDefs } from './props-definition';
|
||||
import {
|
||||
skeletonUsageSnippet,
|
||||
demo1Snippet,
|
||||
demo2Snippet,
|
||||
} from './snippets';
|
||||
import { skeletonUsageSnippet, demo1Snippet, demo2Snippet } from './snippets';
|
||||
import { Demo1, Demo2 } from './components';
|
||||
import { PageTitle } from '@/components/PageTitle';
|
||||
import { Theming } from '@/components/Theming';
|
||||
@@ -34,25 +30,13 @@ import { SkeletonDefinition } from '../../../utils/definitions';
|
||||
|
||||
You can use a mix of different sizes to create a more complex skeleton.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<Demo1 />}
|
||||
code={demo1Snippet}
|
||||
open
|
||||
/>
|
||||
<Snippet align="center" py={4} preview={<Demo1 />} code={demo1Snippet} open />
|
||||
|
||||
### Demo 2
|
||||
|
||||
You can use a mix of different sizes to create a more complex skeleton.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<Demo2 />}
|
||||
code={demo2Snippet}
|
||||
open
|
||||
/>
|
||||
<Snippet align="center" py={4} preview={<Demo2 />} code={demo2Snippet} open />
|
||||
|
||||
<Theming definition={SkeletonDefinition} />
|
||||
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import { TableRockBand, SelectionModePlayground, SelectionBehaviorPlayground, SelectionToggleWithActions } from './components';
|
||||
import {
|
||||
TableRockBand,
|
||||
SelectionModePlayground,
|
||||
SelectionBehaviorPlayground,
|
||||
SelectionToggleWithActions,
|
||||
} from './components';
|
||||
import {
|
||||
tablePropDefs,
|
||||
tableHeaderPropDefs,
|
||||
@@ -28,11 +33,7 @@ import { TableDefinition } from '../../../utils/definitions';
|
||||
description="A flexible table component built on top of TanStack Table with built-in styling, interactions, and pagination support."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
preview={<TableRockBand />}
|
||||
code={tableBasicSnippet}
|
||||
/>
|
||||
<Snippet py={4} preview={<TableRockBand />} code={tableBasicSnippet} />
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -14,7 +14,12 @@ import {
|
||||
disabledTabsSnippet,
|
||||
orientationSnippet,
|
||||
} from './snippets';
|
||||
import { Default, DefaultSelectedKey, DisabledTabs, Orientation } from './components';
|
||||
import {
|
||||
Default,
|
||||
DefaultSelectedKey,
|
||||
DisabledTabs,
|
||||
Orientation,
|
||||
} from './components';
|
||||
import { PageTitle } from '@/components/PageTitle';
|
||||
import { Theming } from '@/components/Theming';
|
||||
import { TabsDefinition } from '../../../utils/definitions';
|
||||
@@ -25,11 +30,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
description="A component for toggling between related panels on the same page."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
preview={<Default />}
|
||||
code={defaultSnippet}
|
||||
/>
|
||||
<Snippet py={4} preview={<Default />} code={defaultSnippet} />
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -66,23 +67,13 @@ Here's how to set which tab is selected by default.
|
||||
|
||||
Here's how to disable specific tabs.
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
preview={<DisabledTabs />}
|
||||
code={disabledTabsSnippet}
|
||||
open
|
||||
/>
|
||||
<Snippet py={4} preview={<DisabledTabs />} code={disabledTabsSnippet} open />
|
||||
|
||||
### Orientation
|
||||
|
||||
Here's how to display tabs vertically.
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
preview={<Orientation />}
|
||||
code={orientationSnippet}
|
||||
open
|
||||
/>
|
||||
<Snippet py={4} preview={<Orientation />} code={orientationSnippet} open />
|
||||
|
||||
<Theming definition={TabsDefinition} />
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import { PropsTable } from '@/components/PropsTable';
|
||||
import { Snippet } from '@/components/Snippet';
|
||||
import { CodeBlock } from '@/components/CodeBlock';
|
||||
import { Default, WithLink, WithIcon, Sizes, RemovingTags, Disabled } from './components';
|
||||
import {
|
||||
tagGroupPropDefs,
|
||||
tagPropDefs,
|
||||
} from './props-definition';
|
||||
Default,
|
||||
WithLink,
|
||||
WithIcon,
|
||||
Sizes,
|
||||
RemovingTags,
|
||||
Disabled,
|
||||
} from './components';
|
||||
import { tagGroupPropDefs, tagPropDefs } from './props-definition';
|
||||
import {
|
||||
usage,
|
||||
preview,
|
||||
@@ -25,12 +29,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
description="A tag group is a list of labels, categories, keywords, filters, or other items, that can be used to group and filter content."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<Default />}
|
||||
code={preview}
|
||||
/>
|
||||
<Snippet align="center" py={4} preview={<Default />} code={preview} />
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -56,37 +55,19 @@ A tag is a single item in a tag group.
|
||||
|
||||
A tag can be a link by passing a `href` prop.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<WithLink />}
|
||||
code={withLink}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<WithLink />} code={withLink} />
|
||||
|
||||
### With Icons
|
||||
|
||||
A tag can have an icon by passing a `icon` prop.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<WithIcon />}
|
||||
code={withIcons}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<WithIcon />} code={withIcons} />
|
||||
|
||||
### Sizes
|
||||
|
||||
A tag can have a size by passing a `size` prop. It could be `small` or `medium`.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Sizes />}
|
||||
code={sizes}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Sizes />} code={sizes} />
|
||||
|
||||
### Removing tags
|
||||
|
||||
@@ -104,13 +85,7 @@ A tag can be removed by passing a `onRemove` prop.
|
||||
|
||||
A switch can be disabled using the `isDisabled` prop.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Disabled />}
|
||||
code={disabled}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Disabled />} code={disabled} />
|
||||
|
||||
<Theming definition={TagGroupDefinition} />
|
||||
|
||||
|
||||
@@ -19,7 +19,12 @@ import { CodeBlock } from '@/components/CodeBlock';
|
||||
description="A text field component for your forms."
|
||||
/>
|
||||
|
||||
<Snippet align="center" py={4} preview={<WithLabel />} code={withLabelSnippet} />
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
preview={<WithLabel />}
|
||||
code={withLabelSnippet}
|
||||
/>
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -35,13 +40,7 @@ import { CodeBlock } from '@/components/CodeBlock';
|
||||
|
||||
We support two different sizes: `small`, `medium`.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Sizes />}
|
||||
code={sizesSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Sizes />} code={sizesSnippet} />
|
||||
|
||||
### With description
|
||||
|
||||
|
||||
@@ -21,11 +21,7 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
description="The `Text` component is used to display content on your page."
|
||||
/>
|
||||
|
||||
<Snippet
|
||||
py={4}
|
||||
preview={<Default />}
|
||||
code={defaultSnippet}
|
||||
/>
|
||||
<Snippet py={4} preview={<Default />} code={defaultSnippet} />
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -42,43 +38,27 @@ import { ChangelogComponent } from '@/components/ChangelogComponent';
|
||||
The `Text` component has a `variant` prop that can be used to change the
|
||||
appearance of the text.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<Variants />}
|
||||
code={variantsSnippet}
|
||||
/>
|
||||
<Snippet open preview={<Variants />} code={variantsSnippet} />
|
||||
|
||||
### All weights
|
||||
|
||||
The `Text` component has a `weight` prop that can be used to change the
|
||||
appearance of the text.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<Weights />}
|
||||
code={weightsSnippet}
|
||||
/>
|
||||
<Snippet open preview={<Weights />} code={weightsSnippet} />
|
||||
|
||||
### All colors
|
||||
|
||||
The `Text` component has a `color` prop that can be used to change the
|
||||
appearance of the text.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<Colors />}
|
||||
code={colorsSnippet}
|
||||
/>
|
||||
<Snippet open preview={<Colors />} code={colorsSnippet} />
|
||||
|
||||
### Truncate
|
||||
|
||||
The `Text` component has a `truncate` prop that can be used to truncate the text.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<Truncate />}
|
||||
code={truncateSnippet}
|
||||
/>
|
||||
<Snippet open preview={<Truncate />} code={truncateSnippet} />
|
||||
|
||||
<Theming definition={TextDefinition} />
|
||||
|
||||
|
||||
@@ -49,13 +49,7 @@ import { ToggleButtonDefinition } from '../../../utils/definitions';
|
||||
|
||||
### Sizes
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
py={4}
|
||||
open
|
||||
preview={<Sizes />}
|
||||
code={sizesSnippet}
|
||||
/>
|
||||
<Snippet align="center" py={4} open preview={<Sizes />} code={sizesSnippet} />
|
||||
|
||||
### Disabled
|
||||
|
||||
|
||||
Reference in New Issue
Block a user