mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 20:33:02 +00:00
Merge upstream
This commit is contained in:
commit
e5b5fdb984
27 changed files with 1142 additions and 1031 deletions
|
@ -4978,7 +4978,7 @@
|
|||
{
|
||||
"name": "__default__",
|
||||
"default": true,
|
||||
"fallback": "<svelte:component this=\"{icon}\" />",
|
||||
"fallback": "<svelte:component this=\"{icon}\" size=\"{20}\" />",
|
||||
"slot_props": "{}"
|
||||
}
|
||||
],
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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."
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue