Skip to content

Commit

Permalink
Docs(web-twig): Make all code block snippets use Twig syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Aug 8, 2024
1 parent 5a6e6f6 commit 1f9ffbd
Show file tree
Hide file tree
Showing 29 changed files with 66 additions and 66 deletions.
10 changes: 5 additions & 5 deletions packages/web-twig/src/Resources/components/Accordion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is Twig implementation of the [Accordion][accordion] component.

## Default usage (Stay open)

```html
```twig
<Accordion>
<AccordionItem id="accordion-item-example-0">
<AccordionHeader id="accordion-item-example-0-header" for="accordion-item-example-0-content">
Expand Down Expand Up @@ -44,7 +44,7 @@ This is Twig implementation of the [Accordion][accordion] component.

## Usage with initial open state (Stay open)

```html
```twig
<Accordion>
<AccordionItem id="accordion-item-example-0">
<AccordionHeader id="accordion-item-example-0-header" for="accordion-item-example-0-content">
Expand All @@ -67,7 +67,7 @@ This is Twig implementation of the [Accordion][accordion] component.

## Usage with only one open item at a time

```html
```twig
<Accordion id="accordion-example">
<AccordionItem id="accordion-item-example-0">
<AccordionHeader id="accordion-item-example-0-header" for="accordion-item-example-0-content">
Expand Down Expand Up @@ -101,7 +101,7 @@ This is Twig implementation of the [Accordion][accordion] component.
You can pass custom content (including HTML) into the slot inside Accordion
Header:

```html
```twig
<AccordionHeader
id="accordion-item-example-1-header"
for="accordion-item-example-1-content"
Expand Down Expand Up @@ -222,7 +222,7 @@ and [escape hatches][readme-escape-hatches].

For full functionality, you need to provide Spirit JavaScript:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the [Alert][alert] component.

Basic example usage:

```html
```twig
<Alert>Alert</Alert>
```

Advanced example usage:

```html
```twig
<Alert color="danger" elementType="span" iconName="close" isCentered>Danger Alert</Alert>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Without lexer:

Example of custom usage:

```html
```twig
<Breadcrumbs>
<ol>
<li class="d-none d-tablet-flex">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the [ButtonLink][button] component.

Basic example usage:

```html
```twig
<ButtonLink href="#">Primary ButtonLink</ButtonLink>
```

Advanced example usage:

```html
```twig
<ButtonLink color="primary" href="#" isBlock>Primary block ButtonLink</ButtonLink>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the [Checkbox][checkbox] component.

Basic example usage:

```html
```twig
<Checkbox id="checkbox-default" label="Label" name="checkboxDefault" />
```

Advanced example usage:

```html
```twig
<Checkbox
id="checkbox-advanced"
isChecked
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ or width of window is changed. There can be several triggers, the same rules app

For full functionality, you need to provide Spirit JavaScript:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is Twig implementation of the [Container][container] component.

Basic example usage:

```html
```twig
<Container>Content</Container>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ and [escape hatches][readme-escape-hatches].

For full functionality, you need to provide Spirit JavaScript:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ FileUploader is a composition of a few subcomponents:

For full functionality, you need to provide Spirit JavaScript:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is Twig implementation of the [Grid][grid] component.

Basic example usage:

```html
```twig
<Grid>
<span>col 1</span>
<span>col 2</span>
Expand All @@ -19,7 +19,7 @@ Basic example usage:

Advanced example usage:

```html
```twig
<Grid
cols="{{ { mobile: 2, tablet: 3, desktop: 4 } }}"
elementType="section"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The Header is a composition of several subcomponents:
For full functionality, you need to provide Spirit JavaScript, which will handle
toggling of the Header component:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Heading/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the [Heading][heading] component.

Basic example usage:

```html
```twig
<Heading>Heading</Heading>
```

Advanced example usage:

```html
```twig
<Heading size="large" elementType="h2">Text content</Heading>
```

Expand Down
8 changes: 4 additions & 4 deletions packages/web-twig/src/Resources/components/Icon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ as seen in [inlineSVG docs][inlinesvg-docs].

Basic example usage:

```html
```twig
<Icon name="warning" />
```

Advanced example usage:

```html
```twig
<Icon name="warning" title="This is warning!" boxSize="32" ariaHidden="false" />
```

Expand All @@ -27,7 +27,7 @@ Without lexer:

If you need to prerender the icon as a [symbol][mdn-symbol], you can use the `isSymbol` prop:

```html
```twig
<Icon name="warning" isSymbol />
```

Expand All @@ -39,7 +39,7 @@ The ID of the symbol will be the same as the `name` prop and the whole SVG eleme
👉 Even though the `svg` only includes the `symbol` element, the `svg` still takes some space in browser,
so you might want to hide it using either wrapping element with `hidden` attribute or use CSS.

```html
```twig
<div hidden>
<Icon name="warning" isSymbol />
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/web-twig/src/Resources/components/Link/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Basic example usage:

Advanced example usage:

```html
```twig
<Link
href="#"
color="primary"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-twig/src/Resources/components/Modal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ When you put it all together:

For full functionality, you need to provide Spirit JavaScript:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Pill/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the [Pill][pill] component.

Basic example usage:

```html
```twig
<Pill>3</Pill>
```

Advanced example usage:

```html
```twig
<Pill color="warning" elementType="div">333</Pill>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Radio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the [Radio][radio] component.

Basic example usage:

```html
```twig
<Radio id="radio-default" label="Label" name="radioDefault" isChecked />
```

Advanced example usage:

```html
```twig
<Radio
id="radio-advanced"
label="some label"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is the Twig implementation of the [ScrollView][scrollview] component.

Basic example usage:

```html
```twig
<ScrollView data-spirit-toggle="scrollView">ScrollView</ScrollView>
```

Advanced example usage:

```html
```twig
<ScrollView direction="horizontal" overflowDecorators="both" data-spirit-toggle="scrollView"
>ScrollView content</ScrollView
>
Expand All @@ -34,7 +34,7 @@ Without lexer:

For full functionality, you need to provide Spirit JavaScript:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Spinner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the Spinner component.

Basic example usage:

```html
```twig
<Spinner />
```

Advanced example usage:

```html
```twig
<Spinner color="secondary" boxSize="36" />
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Basic example usage:

```html
```twig
<Stack>
<div>Block 1</div>
<div>Block 2</div>
Expand All @@ -14,7 +14,7 @@ Basic example usage:

Advanced example usage:

```html
```twig
<Stack elementType="ul" hasIntermediateDividers hasStartDivider hasEndDivider>
<li>
<div>List item 1</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Tabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is Twig implementation of the [Tabs][tabs] component.

Basic example usage:

```html
```twig
<TabList>
<TabItem>
<TabLink isSelected id="pane-1-tab" targetPaneId="pane-1" data-spirit-toggle="tabs">Item selected</TabLink>
Expand Down Expand Up @@ -101,7 +101,7 @@ and [escape hatches][readme-escape-hatches].

For full functionality, you need to provide Spirit JavaScript:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Tag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the [Tag][tag] component.

Basic example usage:

```html
```twig
<Tag>Tag</Tag>
```

Advanced example usage:

```html
```twig
<Tag color="success" elementType="div" size="small" isSubtle>Tag content</Tag>
```

Expand Down
4 changes: 2 additions & 2 deletions packages/web-twig/src/Resources/components/Text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ This is Twig implementation of the [Text][text] component.

Basic example usage:

```html
```twig
<Text>Text content</Text>
```

Advanced example usage:

```html
```twig
<Text size="large" emphasis="italic">Text content</Text>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ and [escape hatches][readme-escape-hatches].
To enable auto-resizing of the textarea, first, you need to provide Spirit JavaScript,
which will handle the functionality:

```html
```twig
<script src="node_modules/@lmc-eu/spirit-web/js/cjs/spirit-web.min.js" async></script>
```

Expand Down
Loading

0 comments on commit 1f9ffbd

Please sign in to comment.