Merge upstream

This commit is contained in:
davideraccagni 2022-04-20 18:35:37 +02:00
commit e5b5fdb984
27 changed files with 1142 additions and 1031 deletions

View file

@ -4978,7 +4978,7 @@
{
"name": "__default__",
"default": true,
"fallback": "<svelte:component this=\"{icon}\" />",
"fallback": "<svelte:component this=\"{icon}\" size=\"{20}\" />",
"slot_props": "{}"
}
],

View file

@ -81,7 +81,7 @@ Set `isSelected` to `true` to enable the selected state for an icon-only, ghost
### Link button
If an `href` value is specified, the component will render an [anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) with a "button" role.
If an `href` value is specified, the component will render an [anchor element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) instead of a `button` element.
<Button href="#">Link button</Button>

View file

@ -328,6 +328,29 @@ title="Load balancers" description="Your organization's active load balancers."
]}"
/>
### Sticky header
Set `stickyHeader` to `true` for the header to be fixed in place.
A maximum height will applied to the datatable to force a scrollbar.
<DataTable
stickyHeader
headers={[
{ key: "name", value: "Name" },
{ key: "protocol", value: "Protocol" },
{ key: "port", value: "Port" },
{ key: "rule", value: "Rule" },
]}
rows={Array.from({ length: 20 }).map((_, i) => ({
id: i,
name: "Load Balancer " + (i + 1),
protocol: "HTTP",
port: i % 3 ? (i % 2 ? 3000 : 80) : 443,
rule: i % 3 ? "Round robin" : "DNS delegation",
}))}
/>
### With toolbar
<DataTable title="Load balancers" description="Your organization's active load balancers."

View file

@ -66,6 +66,8 @@ Note that `inline` must be `false` when rendering a link with an icon.
### Disabled
A `disabled` link will render a `p` tag instead of an anchor element.
<Link disabled href="https://www.carbondesignsystem.com/">
Carbon Design System
</Link>

View file

@ -2,7 +2,7 @@
import { Grid, Row, Column } from "carbon-components-svelte";
</script>
<div>Adding padding to Grid applies it to all child columns:</div>
<div>Adding padding to Grid applies it to columns in all rows:</div>
<Grid padding>
<Row>
@ -13,7 +13,7 @@
</Row>
</Grid>
<div>Adding padding to a Row only applies its child columns:</div>
<div>Adding padding to a Row only applies to its columns:</div>
<Grid>
<Row padding>