mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
docs: replace yarn
with npm
as default
This commit is contained in:
parent
67673d5161
commit
61eeb37a74
4 changed files with 10 additions and 10 deletions
|
@ -36,7 +36,7 @@ You can override the default copy functionality with your own implementation. Se
|
||||||
|
|
||||||
## Default (single-line)
|
## Default (single-line)
|
||||||
|
|
||||||
<CodeSnippet code="yarn add carbon-components-svelte" />
|
<CodeSnippet code="npm i carbon-components-svelte" />
|
||||||
|
|
||||||
## Overriding copy functionality
|
## Overriding copy functionality
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ In this example, we use the open source module [clipboard-copy](https://github.c
|
||||||
|
|
||||||
To prevent text from being copied entirely, pass a no-op function to the `copy` prop.
|
To prevent text from being copied entirely, pass a no-op function to the `copy` prop.
|
||||||
|
|
||||||
<CodeSnippet code="yarn add carbon-components-svelte" copy={() => {}} />
|
<CodeSnippet code="npm i carbon-components-svelte" copy={() => {}} />
|
||||||
|
|
||||||
## Inline
|
## Inline
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ Use the `showMoreText` and `showLessText` props to override the default "Show mo
|
||||||
|
|
||||||
The `disabled` prop applies only to the `"single"` and `"multi"` code snippet types.
|
The `disabled` prop applies only to the `"single"` and `"multi"` code snippet types.
|
||||||
|
|
||||||
<CodeSnippet disabled code="yarn add carbon-components-svelte" />
|
<CodeSnippet disabled code="npm i carbon-components-svelte" />
|
||||||
<br />
|
<br />
|
||||||
<CodeSnippet disabled type="multi" code="{comment}" />
|
<CodeSnippet disabled type="multi" code="{comment}" />
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<CodeSnippet
|
<CodeSnippet
|
||||||
code="yarn add carbon-components-svelte"
|
code="npm i carbon-components-svelte"
|
||||||
copy="{(text) => copy(text)}"
|
copy="{(text) => copy(text)}"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
metatags.description =
|
metatags.description =
|
||||||
"The Svelte implementation of the Carbon Design System featuring UI components, icons, pictograms, and charts.";
|
"The Svelte implementation of the Carbon Design System featuring UI components, icons, pictograms, and charts.";
|
||||||
|
|
||||||
const installYarn = "yarn add carbon-components-svelte";
|
|
||||||
const installNpm = "npm i carbon-components-svelte";
|
const installNpm = "npm i carbon-components-svelte";
|
||||||
const installPnpm = "pnpm i carbon-components-svelte";
|
const installPnpm = "pnpm i carbon-components-svelte";
|
||||||
|
const installYarn = "yarn add carbon-components-svelte";
|
||||||
const themes = {
|
const themes = {
|
||||||
white: "White",
|
white: "White",
|
||||||
g10: "Gray 10",
|
g10: "Gray 10",
|
||||||
|
@ -85,19 +85,19 @@
|
||||||
<Row style="margin-bottom: var(--cds-layout-02)">
|
<Row style="margin-bottom: var(--cds-layout-02)">
|
||||||
<Column noGutter>
|
<Column noGutter>
|
||||||
<Tabs>
|
<Tabs>
|
||||||
<Tab label="Yarn" />
|
|
||||||
<Tab label="NPM" />
|
<Tab label="NPM" />
|
||||||
<Tab label="pnpm" />
|
<Tab label="pnpm" />
|
||||||
|
<Tab label="Yarn" />
|
||||||
<div slot="content" style="margin: 1rem -1rem">
|
<div slot="content" style="margin: 1rem -1rem">
|
||||||
<TabContent>
|
|
||||||
<CodeSnippet code="{installYarn}" />
|
|
||||||
</TabContent>
|
|
||||||
<TabContent>
|
<TabContent>
|
||||||
<CodeSnippet code="{installNpm}" />
|
<CodeSnippet code="{installNpm}" />
|
||||||
</TabContent>
|
</TabContent>
|
||||||
<TabContent>
|
<TabContent>
|
||||||
<CodeSnippet code="{installPnpm}" />
|
<CodeSnippet code="{installPnpm}" />
|
||||||
</TabContent>
|
</TabContent>
|
||||||
|
<TabContent>
|
||||||
|
<CodeSnippet code="{installYarn}" />
|
||||||
|
</TabContent>
|
||||||
</div>
|
</div>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</Column>
|
</Column>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let copy = (text: string) => text;
|
export let copy = (text: string) => text;
|
||||||
export let code = "yarn add carbon-component-svelte";
|
export let code = "npm i carbon-component-svelte";
|
||||||
|
|
||||||
import { CodeSnippet } from "../types";
|
import { CodeSnippet } from "../types";
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue