### Storybook Meta Configuration Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/docs/stories/00-getting-started/welcome.mdx Configures Storybook documentation metadata, setting the title for the 'Getting Started/Welcome' section. This is a standard practice in Storybook for organizing documentation pages. ```javascript import { Meta } from '@storybook/addon-docs/blocks'; ``` -------------------------------- ### Create Webiny Project (Simple Usage) Source: https://github.com/webiny/webiny-js/blob/next/packages/create-webiny-project/DEVELOPMENT.md Demonstrates the basic command to create a new Webiny project using a local NPM tag. This is the simplest way to start a new project. ```bash npx create-webiny-project@local-npm my-test-project --tag local-npm ``` -------------------------------- ### Install Webiny React Rich Text Lexical Renderer Source: https://github.com/webiny/webiny-js/blob/next/packages/react-rich-text-lexical-renderer/DEVELOPMENT.md Instructions for installing the `@webiny/react-rich-text-lexical-renderer` package using npm or yarn. ```bash npm install --save @webiny/react-rich-text-lexical-renderer ``` ```bash yarn add @webiny/react-rich-text-lexical-renderer ``` -------------------------------- ### Tooltip Alignment Example (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/Tooltip/Tooltip.mdx Demonstrates different alignment options for tooltips relative to their trigger elements. This React example uses the 'start', 'center', and 'end' alignment values. ```jsx import React from "react"; import { Tooltip } from "@webiny/admin-ui"; const AlignmentExample = () => { return (
  Start  

} content={
Aligned to start
} align="start" />   Center  

} content={
Aligned to center
} align="center" />   End  

} content={
Aligned to end
} align="end" />
); }; export default AlignmentExample; ``` -------------------------------- ### Create Webiny Project (Advanced/CI Usage) Source: https://github.com/webiny/webiny-js/blob/next/packages/create-webiny-project/DEVELOPMENT.md Shows an advanced command for creating a Webiny project, suitable for CI/CD environments. It includes options for non-interactive setup, specifying NPM registry, and template configurations. ```bash npx create-webiny-project@local-npm my-test-project \ --tag local-npm --no-interactive \ --assign-to-yarnrc '{"npmRegistryServer":"http://localhost:4873","unsafeHttpWhitelist":["localhost"]}' \ --template-options '{"region":"eu-central-1","vpc":false}' ``` -------------------------------- ### Basic Tooltip Example in React Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/Tooltip/Tooltip.mdx Illustrates a basic implementation of the Tooltip component with default settings. This example shows how to render a simple tooltip that appears on hover. ```jsx import React from "react"; import { Tooltip } from "@webiny/admin-ui"; const BasicTooltipExample = () => { return ( Tooltip trigger

} content={ <> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec viverra sit amet massa sagittis sollicitudin. } />
); }; export default BasicTooltipExample; ``` -------------------------------- ### Icon Component Color Variants Examples (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/Icon/Icon.mdx Provides examples of different color variants for the Icon component. This includes 'inherit', 'accent', 'neutral-light', 'neutral-strong', and 'neutral-strong-transparent'. Each example demonstrates how to apply a specific color to the icon. These examples require React and the '@webiny/admin-ui' package. ```tsx import React from "react"; import { Icon } from "@webiny/admin-ui"; import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg"; const InheritColorIconExample = () => { return (
} label="This is an icon" size="md" color="inherit" />
); }; export default InheritColorIconExample; ``` ```tsx import React from "react"; import { Icon } from "@webiny/admin-ui"; import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg"; const AccentIconExample = () => { return ( } label="This is an icon" size="md" color="accent" /> ); }; export default AccentIconExample; ``` ```tsx import React from "react"; import { Icon } from "@webiny/admin-ui"; import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg"; const NeutralLightIconExample = () => { return ( } label="This is an icon" size="md" color="neutral-light" /> ); }; export default NeutralLightIconExample; ``` ```tsx import React from "react"; import { Icon } from "@webiny/admin-ui"; import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg"; const NeutralStrongIconExample = () => { return ( } label="This is an icon" size="md" color="neutral-strong" /> ); }; export default NeutralStrongIconExample; ``` ```tsx import React from "react"; import { Icon } from "@webiny/admin-ui"; import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg"; const NeutralStrongTransparentIconExample = () => { return (
} label="This is an icon" size="md" color="neutral-strong-transparent" />
); }; export default NeutralStrongTransparentIconExample; ``` -------------------------------- ### HeaderBar with Start and End Content (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/HeaderBar/HeaderBar.mdx This example shows how to configure the HeaderBar with both start and end content. The start content typically displays navigation or context, while the end content handles user actions or information. This is a common pattern for application headers. ```javascript import React from "react"; import { HeaderBar, Button, IconButton, Avatar, Text } from "@webiny/admin-ui"; import { ReactComponent as KeyboardArrowRightIcon } from "@webiny/icons/keyboard_arrow_down.svg"; const StartEndContentOnlyExample = () => { const StartContent = () => ( {"Headless CMS / Articles / The best article ever"} ); const EndContent = () => (
); return } end={} />; }; export default StartEndContentOnlyExample; ``` -------------------------------- ### HeaderBar Component: Start Content Only Example (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/HeaderBar/HeaderBar.mdx Illustrates how to use the HeaderBar component with only the 'start' prop populated. This example shows a simple text element in the start section, suitable for breadcrumbs or titles. ```tsx import React from "react"; import { HeaderBar, Text } from "@webiny/admin-ui"; const StartContentOnlyExample = () => { const StartContent = () => ( {"Headless CMS / Articles / The best article ever"} ); return } />; }; export default StartContentOnlyExample; ``` -------------------------------- ### React Grid Layout Example with Webiny UI Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/Grid/Grid.mdx Demonstrates how to use the Grid component from '@webiny/admin-ui' to create a responsive layout. It showcases column spanning and spacing configurations. This example requires React and the Webiny admin UI library. ```jsx import React from "react"; import { Grid } from "@webiny/admin-ui"; const GridExample = () => { return ( Col 1 Col 2
Span: 3
Col 3 Col 4 Col 5 Col 6 Col 7
Span: 2
Col 8 Col 9
); }; export default GridExample; ``` -------------------------------- ### List with Actions Example (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/List/List.mdx Demonstrates how to add action buttons (like edit, delete, open) to list items. This example utilizes various components from `@webiny/admin-ui` and `@webiny/icons` for icons. ```javascript import React from "react"; import { List } from "@webiny/admin-ui"; import { ReactComponent as EditIcon } from "@webiny/icons/edit.svg"; import { ReactComponent as TrashIcon } from "@webiny/icons/delete.svg"; import { ReactComponent as OpenIcon } from "@webiny/icons/visibility.svg"; import { ReactComponent as MoreIcon } from "@webiny/icons/more_vert.svg"; import { ReactComponent as ChartIcon } from "@webiny/icons/insert_chart.svg"; const WithActionsExample = () => { return ( } label={"Chart"} />} actions={ <> } /> } /> } /> } /> } /> } label={"Chart"} />} actions={ <> } /> } /> } /> } /> } /> ); }; export default WithActionsExample; ``` -------------------------------- ### Sidebar Component Usage Example (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/Sidebar/Sidebar.mdx Demonstrates how to implement the Sidebar component for application navigation. It requires React and the '@webiny/admin-ui' package. The example showcases nested menu items, links, and icons. ```jsx import React from "react"; import { Sidebar, SidebarProvider } from "@webiny/admin-ui"; import { ReactComponent as CmsIcon } from "@webiny/icons/web.svg"; import { ReactComponent as PageBuilderIcon } from "@webiny/icons/table_chart.svg"; const SidebarExample = () => { return ( } label={"Webiny"} /> } > } />} /> } />} > ); }; export default SidebarExample; ``` -------------------------------- ### Start Verdaccio Local Registry Source: https://github.com/webiny/webiny-js/blob/next/packages/create-webiny-project/DEVELOPMENT.md Initiates a local Verdaccio instance, which acts as a private NPM registry. This is a prerequisite for testing local package builds without publishing to the public NPM. ```bash yarn verdaccio:start ``` -------------------------------- ### Icon Component Default Example (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/Icon/Icon.mdx Illustrates the default rendering of the Icon component. This example showcases a standard implementation without specific color or size overrides, relying on default props for presentation. It requires React and the '@webiny/admin-ui' package. ```tsx import React from "react"; import { Icon } from "@webiny/admin-ui"; import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg"; const DefaultIconExample = () => { return ( } label="This is an icon" size="md" color="accent" /> ); }; export default DefaultIconExample; ``` -------------------------------- ### Icon Component Usage Example (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/Icon/Icon.mdx Demonstrates the basic usage of the Icon component from '@webiny/admin-ui'. It shows how to import the component, provide an SVG icon, accessibility label, size, and color. This example requires React and the '@webiny/admin-ui' package. ```tsx import React from "react"; import { Icon } from "@webiny/admin-ui"; import { ReactComponent as CloseIcon } from "@webiny/icons/close.svg"; const IconExample = () => { return ( } label="Close icon" size="md" color="accent" /> ); }; export default IconExample; ``` -------------------------------- ### Card Component Usage Example (React) Source: https://github.com/webiny/webiny-js/blob/next/packages/admin-ui/src/Card/Card.mdx Demonstrates how to use the Card component from '@webiny/admin-ui'. It showcases the inclusion of title, description, actions, options, and custom content within the card. This example requires React and the '@webiny/admin-ui' package. ```tsx import React from "react"; import { Card, Button, IconButton, Icon } from "@webiny/admin-ui"; import { ReactComponent as MoreVertical } from "@webiny/icons/more_vert.svg"; const CardExample = () => { return (